Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289127
b: refs/heads/master
c: cb532e4
h: refs/heads/master
i:
  289125: b827447
  289123: 213b323
  289119: f55b159
v: v3
  • Loading branch information
Dan Magenheimer authored and Greg Kroah-Hartman committed Feb 24, 2012
1 parent ed377ee commit 5ecb807
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa8c2a035848cfca1f0f139c46c5bb3428abd6b4
refs/heads/master: cb532e4b2bb2f156e9a6c2c4535334db764f603c
28 changes: 14 additions & 14 deletions trunk/drivers/staging/ramster/cluster/masklog.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@

#include "masklog.h"

struct mlog_bits mlog_and_bits = MLOG_BITS_RHS(MLOG_INITIAL_AND_MASK);
EXPORT_SYMBOL_GPL(mlog_and_bits);
struct mlog_bits mlog_not_bits = MLOG_BITS_RHS(0);
EXPORT_SYMBOL_GPL(mlog_not_bits);
struct mlog_bits r2_mlog_and_bits = MLOG_BITS_RHS(MLOG_INITIAL_AND_MASK);
EXPORT_SYMBOL_GPL(r2_mlog_and_bits);
struct mlog_bits r2_mlog_not_bits = MLOG_BITS_RHS(0);
EXPORT_SYMBOL_GPL(r2_mlog_not_bits);

static ssize_t mlog_mask_show(u64 mask, char *buf)
{
char *state;

if (__mlog_test_u64(mask, mlog_and_bits))
if (__mlog_test_u64(mask, r2_mlog_and_bits))
state = "allow";
else if (__mlog_test_u64(mask, mlog_not_bits))
else if (__mlog_test_u64(mask, r2_mlog_not_bits))
state = "deny";
else
state = "off";
Expand All @@ -50,14 +50,14 @@ static ssize_t mlog_mask_show(u64 mask, char *buf)
static ssize_t mlog_mask_store(u64 mask, const char *buf, size_t count)
{
if (!strnicmp(buf, "allow", 5)) {
__mlog_set_u64(mask, mlog_and_bits);
__mlog_clear_u64(mask, mlog_not_bits);
__mlog_set_u64(mask, r2_mlog_and_bits);
__mlog_clear_u64(mask, r2_mlog_not_bits);
} else if (!strnicmp(buf, "deny", 4)) {
__mlog_set_u64(mask, mlog_not_bits);
__mlog_clear_u64(mask, mlog_and_bits);
__mlog_set_u64(mask, r2_mlog_not_bits);
__mlog_clear_u64(mask, r2_mlog_and_bits);
} else if (!strnicmp(buf, "off", 3)) {
__mlog_clear_u64(mask, mlog_not_bits);
__mlog_clear_u64(mask, mlog_and_bits);
__mlog_clear_u64(mask, r2_mlog_not_bits);
__mlog_clear_u64(mask, r2_mlog_and_bits);
} else
return -EINVAL;

Expand Down Expand Up @@ -134,7 +134,7 @@ static struct kset mlog_kset = {
.kobj = {.ktype = &mlog_ktype},
};

int mlog_sys_init(struct kset *r2cb_kset)
int r2_mlog_sys_init(struct kset *r2cb_kset)
{
int i = 0;

Expand All @@ -149,7 +149,7 @@ int mlog_sys_init(struct kset *r2cb_kset)
return kset_register(&mlog_kset);
}

void mlog_sys_shutdown(void)
void r2_mlog_sys_shutdown(void)
{
kset_unregister(&mlog_kset);
}
10 changes: 5 additions & 5 deletions trunk/drivers/staging/ramster/cluster/masklog.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ struct mlog_bits {
unsigned long words[MLOG_MAX_BITS / BITS_PER_LONG];
};

extern struct mlog_bits mlog_and_bits, mlog_not_bits;
extern struct mlog_bits r2_mlog_and_bits, r2_mlog_not_bits;

#if BITS_PER_LONG == 32

Expand Down Expand Up @@ -186,8 +186,8 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
#define mlog(mask, fmt, args...) do { \
u64 __m = MLOG_MASK_PREFIX | (mask); \
if ((__m & ML_ALLOWED_BITS) && \
__mlog_test_u64(__m, mlog_and_bits) && \
!__mlog_test_u64(__m, mlog_not_bits)) { \
__mlog_test_u64(__m, r2_mlog_and_bits) && \
!__mlog_test_u64(__m, r2_mlog_not_bits)) { \
if (__m & ML_ERROR) \
__mlog_printk(KERN_ERR, "ERROR: "fmt , ##args); \
else if (__m & ML_NOTICE) \
Expand All @@ -214,7 +214,7 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;

#include <linux/kobject.h>
#include <linux/sysfs.h>
int mlog_sys_init(struct kset *r2cb_subsys);
void mlog_sys_shutdown(void);
int r2_mlog_sys_init(struct kset *r2cb_subsys);
void r2_mlog_sys_shutdown(void);

#endif /* R2CLUSTER_MASKLOG_H */

0 comments on commit 5ecb807

Please sign in to comment.