Re: [PATCH] staging:bcm2048 : Add parentheses around variable x
On Fri, Feb 3, 2017 at 3:42 PM, Dan Carpenter wrote: > On Sat, Dec 03, 2016 at 03:14:26PM +0530, Tabrez khan wrote: >> Add parentheses around variable x for the readability purpose. >> > > It's not really about readability... > > regards, > dan carpenter > I will resend it again. -- Regards Tabrez Khan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging:bcm2048 : Add parentheses around variable x
Add parentheses around variable x for the readability purpose. This warning was found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index 4d9bd02..2f28dd0 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -185,7 +185,7 @@ #define v4l2_to_dev(f) ((f * BCM2048_FREQV4L2_MULTI) / BCM2048_FREQDEV_UNIT) #define msb(x) ((u8)((u16)x >> 8)) -#define lsb(x) ((u8)((u16)x & 0x00FF)) +#define lsb(x) ((u8)((u16)(x) & 0x00FF)) #define compose_u16(msb, lsb) (((u16)msb << 8) | lsb) #define BCM2048_DEFAULT_POWERING_DELAY 20 -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: i4l :fixed coding style
Remove braces {} for single if statement block. Signed-off-by: Tabrez khan --- drivers/staging/i4l/act2000/module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/i4l/act2000/module.c b/drivers/staging/i4l/act2000/module.c index 99c9c0a..fc14de4 100644 --- a/drivers/staging/i4l/act2000/module.c +++ b/drivers/staging/i4l/act2000/module.c @@ -372,9 +372,8 @@ act2000_command(act2000_card *card, isdn_ctrl *c) if (!(chan = find_channel(card, c->arg & 0x0f))) break; if (strlen(c->parm.num)) { - if (card->ptype == ISDN_PTYPE_EURO) { + if (card->ptype == ISDN_PTYPE_EURO) chan->eazmask = act2000_find_msn(card, c->parm.num, 0); - } if (card->ptype == ISDN_PTYPE_1TR6) { int i; chan->eazmask = 0; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging : i4l : Remove blank lines
From: Tabrez khan Remove blank lines. Signed-off-by: Tabrez khan --- drivers/staging/i4l/act2000/module.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/i4l/act2000/module.c b/drivers/staging/i4l/act2000/module.c index fc14de4..b2ebaf0 100644 --- a/drivers/staging/i4l/act2000/module.c +++ b/drivers/staging/i4l/act2000/module.c @@ -563,7 +563,6 @@ if_sendbuf(int id, int channel, int ack, struct sk_buff *skb) return -ENODEV; } - /* * Allocate a new card-struct, initialize it * link it into cards-list. -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging : osc : coding style fix
Remove unnecessary braces {} for single if statement block. This warning is found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c index 4bbe219..5ded31a 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cache.c +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c @@ -1420,10 +1420,8 @@ static void osc_release_write_grant(struct client_obd *cli, struct brw_page *pga) { assert_spin_locked(&cli->cl_loi_list_lock); - if (!(pga->flag & OBD_BRW_FROM_GRANT)) { + if (!(pga->flag & OBD_BRW_FROM_GRANT)) return; - } - pga->flag &= ~OBD_BRW_FROM_GRANT; atomic_long_dec(&obd_dirty_pages); cli->cl_dirty_pages--; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging : i4l : Remove blank lines
Remove unnecessary blank lines. This warning was found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/i4l/act2000/module.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/i4l/act2000/module.c b/drivers/staging/i4l/act2000/module.c index fc14de4..b2ebaf0 100644 --- a/drivers/staging/i4l/act2000/module.c +++ b/drivers/staging/i4l/act2000/module.c @@ -563,7 +563,6 @@ if_sendbuf(int id, int channel, int ack, struct sk_buff *skb) return -ENODEV; } - /* * Allocate a new card-struct, initialize it * link it into cards-list. -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging : osc : Remove braces from single-line body
Remove unnecessary braces {} for single if statement block. This warning is found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c index 4bbe219..5ded31a 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cache.c +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c @@ -1420,10 +1420,8 @@ static void osc_release_write_grant(struct client_obd *cli, struct brw_page *pga) { assert_spin_locked(&cli->cl_loi_list_lock); - if (!(pga->flag & OBD_BRW_FROM_GRANT)) { + if (!(pga->flag & OBD_BRW_FROM_GRANT)) return; - } - pga->flag &= ~OBD_BRW_FROM_GRANT; atomic_long_dec(&obd_dirty_pages); cli->cl_dirty_pages--; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging : osc : Remove braces from single-line body
On Thu, Dec 15, 2016 at 7:08 AM, Greg KH wrote: > On Thu, Dec 15, 2016 at 07:03:52AM +0530, Tabrez khan wrote: >> Remove unnecessary braces {} for single if statement block. >> This warning is found using checkpatch.pl. >> >> Signed-off-by: Tabrez khan >> --- >> drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c >> b/drivers/staging/lustre/lustre/osc/osc_cache.c >> index 4bbe219..5ded31a 100644 >> --- a/drivers/staging/lustre/lustre/osc/osc_cache.c >> +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c >> @@ -1420,10 +1420,8 @@ static void osc_release_write_grant(struct client_obd >> *cli, >> struct brw_page *pga) >> { >> assert_spin_locked(&cli->cl_loi_list_lock); >> - if (!(pga->flag & OBD_BRW_FROM_GRANT)) { >> + if (!(pga->flag & OBD_BRW_FROM_GRANT)) >> return; >> - } >> - > > Why did you also delete the blank line? Because to keep the kernel coding style as close as possible and after deleting brace it leads to extra empty line so i delete it. Please guide if done something wrong. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging : lustre : Remove braces from single-line body.
Remove unnecessary braces {} for single while statement. This warning is found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/lustre/lustre/obdclass/cl_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c b/drivers/staging/lustre/lustre/obdclass/cl_io.c index bc4b7b6..2daede8 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_io.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c @@ -1371,9 +1371,9 @@ int cl_sync_io_wait(const struct lu_env *env, struct cl_sync_io *anchor, LASSERT(atomic_read(&anchor->csi_sync_nr) == 0); /* wait until cl_sync_io_note() has done wakeup */ - while (unlikely(atomic_read(&anchor->csi_barrier) != 0)) { + while (unlikely(atomic_read(&anchor->csi_barrier) != 0)) cpu_relax(); - } + return rc; } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging : lustre : Remove braces from single-line body.
Remove unnecessary braces {} from single line if statement. This warning is found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/lustre/lustre/ptlrpc/import.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c index a23d0a0..477d832 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/import.c +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c @@ -1134,9 +1134,9 @@ static int ptlrpc_connect_interpret(const struct lu_env *env, } /* Sanity checks for a reconnected import. */ - if (!(imp->imp_replayable) != !(msg_flags & MSG_CONNECT_REPLAYABLE)) { + if (!(imp->imp_replayable) != !(msg_flags & MSG_CONNECT_REPLAYABLE)) CERROR("imp_replayable flag does not match server after reconnect. We should LBUG right here.\n"); - } + if (lustre_msg_get_last_committed(request->rq_repmsg) > 0 && lustre_msg_get_last_committed(request->rq_repmsg) < -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging : lustre : Remove braces from single-line body.
Remove unnecessary braces from single-line if statement. This warning is found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/lustre/lustre/ptlrpc/import.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c index 477d832..b55680b 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/import.c +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c @@ -1392,9 +1392,9 @@ int ptlrpc_import_recovery_state_machine(struct obd_import *imp) } if (imp->imp_state == LUSTRE_IMP_REPLAY_WAIT) { - if (atomic_read(&imp->imp_replay_inflight) == 0) { + if (atomic_read(&imp->imp_replay_inflight) == 0) IMPORT_SET_STATE(imp, LUSTRE_IMP_RECOVER); - } + } if (imp->imp_state == LUSTRE_IMP_RECOVER) { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging : lustre : Remove braces from single line body.
Remove unnecessary braces from single line if statement. This warning is found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/lustre/lustre/osc/lproc_osc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/lproc_osc.c b/drivers/staging/lustre/lustre/osc/lproc_osc.c index f0062d4..098ef1e 100644 --- a/drivers/staging/lustre/lustre/osc/lproc_osc.c +++ b/drivers/staging/lustre/lustre/osc/lproc_osc.c @@ -585,9 +585,9 @@ static ssize_t max_pages_per_rpc_store(struct kobject *kobj, chunk_mask = ~((1 << (cli->cl_chunkbits - PAGE_SHIFT)) - 1); /* max_pages_per_rpc must be chunk aligned */ val = (val + ~chunk_mask) & chunk_mask; - if (val == 0 || val > ocd->ocd_brw_size >> PAGE_SHIFT) { + if (val == 0 || val > ocd->ocd_brw_size >> PAGE_SHIFT) return -ERANGE; - } + spin_lock(&cli->cl_loi_list_lock); cli->cl_max_pages_per_rpc = val; client_adjust_max_dirty(cli); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging:lustre:fixed space coding style in o2iblnd_cb.c
Space required before assignment operator, to make close to kernel coding style. This error is found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index b27de88..ba1782b 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -3276,7 +3276,7 @@ kiblnd_disconnect_conn(struct kib_conn *conn) int kiblnd_connd(void *arg) { - spinlock_t *lock= &kiblnd_data.kib_connd_lock; + spinlock_t *lock = &kiblnd_data.kib_connd_lock; wait_queue_t wait; unsigned long flags; struct kib_conn *conn; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging:lustre:fixed space coding style in o2iblnd_cb.c
Space required before assignment operator, to make close to kernel coding style. This error is found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index b27de88..ba1782b 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -3276,7 +3276,7 @@ kiblnd_disconnect_conn(struct kib_conn *conn) int kiblnd_connd(void *arg) { - spinlock_t *lock= &kiblnd_data.kib_connd_lock; + spinlock_t *lock = &kiblnd_data.kib_connd_lock; wait_queue_t wait; unsigned long flags; struct kib_conn *conn; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging:lustre:remove braces from single-line body
Remove unnecessary braces from single line if statement. This warning is found using checkpatch.pl. Signed-off-by: Tabrez khan --- drivers/staging/lustre/lustre/obdecho/echo_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c index 505582f..3050fa7 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c @@ -1694,9 +1694,9 @@ static int echo_client_connect(const struct lu_env *env, struct lustre_handle conn = { 0 }; rc = class_connect(&conn, src, cluuid); - if (rc == 0) { + if (rc == 0) *exp = class_conn2export(&conn); - } + return rc; } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel