Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72931
b: refs/heads/master
c: 5c41542
h: refs/heads/master
i:
  72929: 0351d95
  72927: e8bb5b3
v: v3
  • Loading branch information
Adrian Bunk authored and David S. Miller committed Oct 31, 2007
1 parent c61929a commit 9388087
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 612 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: a3634d7169f56eca5e349fce2f1de228fc10efda
refs/heads/master: 5c41542bdeaafe922a07bcdebc10d96a3b8ffeee
4 changes: 2 additions & 2 deletions trunk/Documentation/SubmittingPatches
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ section Linus Computer Science 101.
Nuff said. If your code deviates too much from this, it is likely
to be rejected without further review, and without comment.

One significant exception is when moving code from one file to
another -- in this case you should not modify the moved code at all in
Once significant exception is when moving code from one file to
another in this case you should not modify the moved code at all in
the same patch which moves it. This clearly delineates the act of
moving the code and your changes. This greatly aids review of the
actual differences and allows tools to better track the history of
Expand Down
556 changes: 0 additions & 556 deletions trunk/Documentation/ja_JP/SubmittingPatches

This file was deleted.

18 changes: 18 additions & 0 deletions trunk/drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,22 @@ void class_device_remove_file(struct class_device * class_dev,
sysfs_remove_file(&class_dev->kobj, &attr->attr);
}

int class_device_create_bin_file(struct class_device *class_dev,
struct bin_attribute *attr)
{
int error = -EINVAL;
if (class_dev)
error = sysfs_create_bin_file(&class_dev->kobj, attr);
return error;
}

void class_device_remove_bin_file(struct class_device *class_dev,
struct bin_attribute *attr)
{
if (class_dev)
sysfs_remove_bin_file(&class_dev->kobj, attr);
}

static ssize_t
class_device_attr_show(struct kobject * kobj, struct attribute * attr,
char * buf)
Expand Down Expand Up @@ -869,6 +885,8 @@ EXPORT_SYMBOL_GPL(class_device_create);
EXPORT_SYMBOL_GPL(class_device_destroy);
EXPORT_SYMBOL_GPL(class_device_create_file);
EXPORT_SYMBOL_GPL(class_device_remove_file);
EXPORT_SYMBOL_GPL(class_device_create_bin_file);
EXPORT_SYMBOL_GPL(class_device_remove_bin_file);

EXPORT_SYMBOL_GPL(class_interface_register);
EXPORT_SYMBOL_GPL(class_interface_unregister);
6 changes: 3 additions & 3 deletions trunk/drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,18 +1228,18 @@ int device_rename(struct device *dev, char *new_name)
sysfs_remove_link(&dev->parent->kobj, old_class_name);
}
}
#else
#endif

if (dev->class) {
sysfs_remove_link(&dev->class->subsys.kobj, old_device_name);
error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj,
dev->bus_id);
if (error) {
/* Uh... how to unravel this if restoring can fail? */
dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n",
__FUNCTION__, error);
}
}
#endif

out:
put_device(dev);

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/infiniband/core/fmr_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
atomic_set(&pool->flush_ser, 0);
init_waitqueue_head(&pool->force_wait);

pool->thread = kthread_run(ib_fmr_cleanup_thread,
pool,
"ib_fmr(%s)",
device->name);
pool->thread = kthread_create(ib_fmr_cleanup_thread,
pool,
"ib_fmr(%s)",
device->name);
if (IS_ERR(pool->thread)) {
printk(KERN_WARNING PFX "couldn't start cleanup thread\n");
ret = PTR_ERR(pool->thread);
Expand Down
10 changes: 1 addition & 9 deletions trunk/drivers/infiniband/hw/ipath/ipath_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,15 +538,7 @@ static u8 flash_csum(struct ipath_flash *ifp, int adjust)
u8 *ip = (u8 *) ifp;
u8 csum = 0, len;

/*
* Limit length checksummed to max length of actual data.
* Checksum of erased eeprom will still be bad, but we avoid
* reading past the end of the buffer we were passed.
*/
len = ifp->if_length;
if (len > sizeof(struct ipath_flash))
len = sizeof(struct ipath_flash);
while (len--)
for (len = 0; len < ifp->if_length; len++)
csum += *ip++;
csum -= ifp->if_csum;
csum = ~csum;
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/infiniband/hw/ipath/ipath_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,17 +453,17 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
}

static void handle_supp_msgs(struct ipath_devdata *dd,
unsigned supp_msgs, char *msg, int msgsz)
unsigned supp_msgs, char msg[512])
{
/*
* Print the message unless it's ibc status change only, which
* happens so often we never want to count it.
*/
if (dd->ipath_lasterror & ~INFINIPATH_E_IBSTATUSCHANGED) {
int iserr;
iserr = ipath_decode_err(msg, msgsz,
dd->ipath_lasterror &
~INFINIPATH_E_IBSTATUSCHANGED);
iserr = ipath_decode_err(msg, sizeof msg,
dd->ipath_lasterror &
~INFINIPATH_E_IBSTATUSCHANGED);
if (dd->ipath_lasterror &
~(INFINIPATH_E_RRCVEGRFULL |
INFINIPATH_E_RRCVHDRFULL | INFINIPATH_E_PKTERRS))
Expand Down Expand Up @@ -492,8 +492,8 @@ static void handle_supp_msgs(struct ipath_devdata *dd,
}

static unsigned handle_frequent_errors(struct ipath_devdata *dd,
ipath_err_t errs, char *msg,
int msgsz, int *noprint)
ipath_err_t errs, char msg[512],
int *noprint)
{
unsigned long nc;
static unsigned long nextmsg_time;
Expand All @@ -512,7 +512,7 @@ static unsigned handle_frequent_errors(struct ipath_devdata *dd,
nextmsg_time = nc + HZ * 3;
}
else if (supp_msgs) {
handle_supp_msgs(dd, supp_msgs, msg, msgsz);
handle_supp_msgs(dd, supp_msgs, msg);
supp_msgs = 0;
nmsgs = 0;
}
Expand All @@ -525,14 +525,14 @@ static unsigned handle_frequent_errors(struct ipath_devdata *dd,

static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
{
char msg[128];
char msg[512];
u64 ignore_this_time = 0;
int i, iserr = 0;
int chkerrpkts = 0, noprint = 0;
unsigned supp_msgs;
int log_idx;

supp_msgs = handle_frequent_errors(dd, errs, msg, sizeof msg, &noprint);
supp_msgs = handle_frequent_errors(dd, errs, msg, &noprint);

/* don't report errors that are masked */
errs &= ~dd->ipath_maskederrs;
Expand Down
14 changes: 5 additions & 9 deletions trunk/drivers/infiniband/hw/ipath/ipath_ruc.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,11 @@ bail:;
void ipath_send_complete(struct ipath_qp *qp, struct ipath_swqe *wqe,
enum ib_wc_status status)
{
unsigned long flags;
u32 last;
u32 last = qp->s_last;

if (++last == qp->s_size)
last = 0;
qp->s_last = last;

/* See ch. 11.2.4.1 and 10.7.3.1 */
if (!(qp->s_flags & IPATH_S_SIGNAL_REQ_WR) ||
Expand All @@ -655,11 +658,4 @@ void ipath_send_complete(struct ipath_qp *qp, struct ipath_swqe *wqe,
wc.port_num = 0;
ipath_cq_enter(to_icq(qp->ibqp.send_cq), &wc, 0);
}

spin_lock_irqsave(&qp->s_lock, flags);
last = qp->s_last;
if (++last >= qp->s_size)
last = 0;
qp->s_last = last;
spin_unlock_irqrestore(&qp->s_lock, flags);
}
4 changes: 2 additions & 2 deletions trunk/drivers/infiniband/hw/mlx4/qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
int size;
int i;

spin_lock_irqsave(&qp->sq.lock, flags);
spin_lock_irqsave(&qp->rq.lock, flags);

ind = qp->sq.head;

Expand Down Expand Up @@ -1448,7 +1448,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
(qp->sq.wqe_cnt - 1));
}

spin_unlock_irqrestore(&qp->sq.lock, flags);
spin_unlock_irqrestore(&qp->rq.lock, flags);

return err;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static struct ib_qp_attr ipoib_cm_err_attr = {
.qp_state = IB_QPS_ERR
};

#define IPOIB_CM_RX_DRAIN_WRID 0xffffffff
#define IPOIB_CM_RX_DRAIN_WRID 0x7fffffff

static struct ib_send_wr ipoib_cm_rx_drain_wr = {
.wr_id = IPOIB_CM_RX_DRAIN_WRID,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wan/lmc/lmc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
sc->lmc_xinfo.Magic1 = 0xDEADBEEF;

if (copy_to_user(ifr->ifr_data, &sc->lmc_xinfo,
sizeof(struct lmc_xinfo))) {
sizeof(struct lmc_xinfo)))
ret = -EFAULT;
else
ret = 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/sysfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ struct dentry *sysfs_get_dentry(struct sysfs_dirent *sd)
* RETURNS:
* Pointer to @sd on success, NULL on failure.
*/
static struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd)
struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd)
{
if (unlikely(!sd))
return NULL;
Expand Down Expand Up @@ -161,7 +161,7 @@ static struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd)
* Put an active reference to @sd. This function is noop if @sd
* is NULL.
*/
static void sysfs_put_active(struct sysfs_dirent *sd)
void sysfs_put_active(struct sysfs_dirent *sd)
{
struct completion *cmpl;
int v;
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/sysfs/sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ extern const struct file_operations sysfs_dir_operations;
extern const struct inode_operations sysfs_dir_inode_operations;

struct dentry *sysfs_get_dentry(struct sysfs_dirent *sd);
struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd);
void sysfs_put_active(struct sysfs_dirent *sd);
struct sysfs_dirent *sysfs_get_active_two(struct sysfs_dirent *sd);
void sysfs_put_active_two(struct sysfs_dirent *sd);
void sysfs_addrm_start(struct sysfs_addrm_cxt *acxt,
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ extern void class_device_put(struct class_device *);

extern void class_device_remove_file(struct class_device *,
const struct class_device_attribute *);
extern int __must_check class_device_create_bin_file(struct class_device *,
struct bin_attribute *);
extern void class_device_remove_bin_file(struct class_device *,
struct bin_attribute *);

struct class_interface {
struct list_head node;
Expand Down
13 changes: 0 additions & 13 deletions trunk/lib/kobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,19 +308,6 @@ int kobject_rename(struct kobject * kobj, const char *new_name)
if (!kobj->parent)
return -EINVAL;

/* see if this name is already in use */
if (kobj->kset) {
struct kobject *temp_kobj;
temp_kobj = kset_find_obj(kobj->kset, new_name);
if (temp_kobj) {
printk(KERN_WARNING "kobject '%s' can not be renamed "
"to '%s' as '%s' is already in existance.\n",
kobject_name(kobj), new_name, new_name);
kobject_put(temp_kobj);
return -EINVAL;
}
}

devpath = kobject_get_path(kobj, GFP_KERNEL);
if (!devpath) {
error = -ENOMEM;
Expand Down

0 comments on commit 9388087

Please sign in to comment.