Remove variables that are set but not used.
Signed-off-by: Christos Gkekas
---
drivers/scsi/fnic/fnic_fcs.c | 9 -
drivers/scsi/fnic/vnic_rq.c | 3 ---
drivers/scsi/fnic/vnic_wq.c | 3 ---
3 files changed, 15 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic
Check whether configured_logical_drive_count is less than 255. Previous
check was always evaluating to true as this variable is defined as u8.
Signed-off-by: Christos Gkekas
---
drivers/scsi/hpsa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/hpsa.c b/drivers
On 16/10/17 18:55:11 +, Don Brace wrote:
> > -Original Message-
> > From: Christos Gkekas [mailto:chris.ge...@gmail.com]
> > Sent: Sunday, October 15, 2017 2:35 PM
> > To: Don Brace ; James E.J. Bottomley
> > ; Martin K. Petersen
> > ; esc.storage
On 16/10/17 11:12:53 +0200, Ilya Dryomov wrote:
> On Sat, Oct 14, 2017 at 12:01 PM, Christos Gkekas
> wrote:
> > Variable 'err' is set but never used, so should be removed.
> >
> > Signed-off-by: Christos Gkekas
> > ---
> > fs/ceph/mds_cl
Delete variables 'gma_bottom' that are set but never used.
Signed-off-by: Christos Gkekas
---
drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c
b/drivers/gpu/drm/i915/gvt/cmd_pars
Change the type of variable 'bb_size' from uint32_t to int to be able to
hold error return values from find_bb_size(). This change seems to have
been missed from previous commit 1e3197d6ad73.
Signed-off-by: Christos Gkekas
---
drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 +-
1 file
Variable configured_logical_drive_count is defined as u8 and thus the
nested if statement always evaluates to true. Remove it and simplify.
Signed-off-by: Christos Gkekas
---
drivers/scsi/hpsa.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/scsi/hpsa.c b
Remove variables that are set but not used.
Signed-off-by: Christos Gkekas
---
drivers/scsi/fnic/fnic_fcs.c | 9 -
drivers/scsi/fnic/vnic_rq.c | 3 ---
drivers/scsi/fnic/vnic_wq.c | 3 ---
3 files changed, 15 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic
Remove redundant variables in quedi_fw.c that are set but not used.
Signed-off-by: Christos Gkekas
---
drivers/scsi/qedi/qedi_fw.c | 17 +
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c
index 93d54ac
Pointers 'scriptb0' are set but never used, so need to be deleted.
Signed-off-by: Christos Gkekas
---
drivers/scsi/sym53c8xx_2/sym_fw.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/scsi/sym53c8xx_2/sym_fw.c
b/drivers/scsi/sym53c8xx_2/sym_fw.c
index 190770b..91db
Many variables in ep0 are set but never used, so should be removed.
Signed-off-by: Christos Gkekas
---
drivers/usb/dwc3/ep0.c | 20
1 file changed, 20 deletions(-)
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 75e6cb0..a4dceae 100644
--- a/drivers/usb
Delete variables 'tree' and 'sb', which are set but never used.
Signed-off-by: Christos Gkekas
---
fs/hfs/bnode.c | 4
fs/hfsplus/bnode.c | 4
2 files changed, 8 deletions(-)
diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c
index d77d844..8d618c9 100644
--- a/fs/
Variable 'err' is set but never used, so should be removed.
Signed-off-by: Christos Gkekas
---
fs/ceph/mds_client.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index f23c820..7cd4fd9 100644
--- a/fs/ceph/mds_client.c
+++
Variable val is unsigned, so checking whether it is less than zero is
redundant.
Signed-off-by: Christos Gkekas
---
drivers/net/wireless/ath/ath9k/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/debug.c
b/drivers/net/wireless/ath/ath9k
Variable val is unsigned, so checking whether it is less than zero is
redundant.
Signed-off-by: Christos Gkekas
---
drivers/net/wireless/ath/ath10k/spectral.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/spectral.c
b/drivers/net/wireless
On 12/10/17 15:45:42 -0700, Gregory Farnum wrote:
> On Thu, Oct 12, 2017 at 2:55 PM, Christos Gkekas
> wrote:
> > Remove variables in mds_client that are set but never used.
>
> Hmm, it looks like all the values removed here (except err) *are* used
> and this patch
On 13/10/17 15:49:15 +0300, Kalle Valo wrote:
> Christos Gkekas writes:
>
> > Variable val is unsigned so checking whether it is less than zero is
> > redundant.
> >
> > Signed-off-by: Christos Gkekas
> > ---
> > drivers/net/wireless/ath/ath9k/debug.c
On 13/10/17 12:28:50 +, Kalle Valo wrote:
> Christos Gkekas writes:
>
> > Variable val is unsigned so checking whether it is less than zero is
> > redundant.
> >
> > Signed-off-by: Christos Gkekas
> > ---
> > drivers/net/wireless/ath/ath10k/s
Remove variables that are set but never used.
Signed-off-by: Christos Gkekas
---
drivers/block/mtip32xx/mtip32xx.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/block/mtip32xx/mtip32xx.c
b/drivers/block/mtip32xx/mtip32xx.c
index 4a3cfc7..b8af735 100644
--- a/drivers/block
Remove variables in mds_client that are set but never used.
Signed-off-by: Christos Gkekas
---
fs/ceph/mds_client.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index f23c820..cadf9b6 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph
Remove variables 'start' and 'end', which are set but never used.
Signed-off-by: Christos Gkekas
---
fs/btrfs/free-space-tree.c | 4
1 file changed, 4 deletions(-)
diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c
index 684f122..fe5e032 100644
--- a
Clean up unused cur_rfstate variables in rtl8188ee, rtl8723ae, rtl8723be
and rtl8821ae.
Signed-off-by: Christos Gkekas
---
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 4 +---
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 4 +---
drivers/net/wireless/realtek/rtlwifi/rtl8723be
Clean up unused bypass variables in verbs.
Signed-off-by: Christos Gkekas
---
drivers/infiniband/hw/hfi1/verbs.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/infiniband/hw/hfi1/verbs.c
b/drivers/infiniband/hw/hfi1/verbs.c
index e232f3c..62c3f4e 100644
--- a/drivers/infiniband
Delete unused channel variables in vxge-traffic.
Signed-off-by: Christos Gkekas
---
drivers/net/ethernet/neterion/vxge/vxge-traffic.c | 19 ---
1 file changed, 19 deletions(-)
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-traffic.c
b/drivers/net/ethernet/neterion/vxge
On 09/10/17 10:38:55 -0700, Dmitry Torokhov wrote:
> On Sun, Oct 08, 2017 at 08:41:16PM +0100, Nick Dyer wrote:
> > On Sun, Oct 08, 2017 at 07:44:18PM +0100, Christos Gkekas wrote:
> > > Variable byte_offset is unsigned so checking whether it is greater or
> > >
On 09/10/17 13:21:17 +0300, Andy Shevchenko wrote:
> On Mon, Oct 9, 2017 at 1:57 AM, Christos Gkekas wrote:
> > A couple of macros are unused and need to be removed.
> > Also variable percent is unsigned so checking whether it is less than
> > zero is redundant.
>
> &
A couple of macros are unused and need to be removed.
Also variable percent is unsigned so checking whether it is less than
zero is redundant.
Signed-off-by: Christos Gkekas
---
drivers/platform/x86/intel_oaktrail.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers
dcb_app priority is unsigned thus checking whether it is less than zero
is redundant.
Signed-off-by: Christos Gkekas
---
drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
b/drivers/net
Variable did_old is unsigned so checking whether it is greater or equal
to zero is not necessary.
Signed-off-by: Christos Gkekas
---
drivers/iommu/intel-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index
Variable size_presence_regĀ·is unsigned so checking whether it is less
than zero is redundant.
Signed-off-by: Christos Gkekas
---
drivers/input/rmi4/rmi_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
Variable val holds the default brightness and is unsigned, therefore
checking whether it is less than zero is redundant.
Signed-off-by: Christos Gkekas
---
drivers/video/backlight/tps65217_bl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/backlight
Variable spp->cpp_index is unsigned so checking whether it is less than
zero is redundant.
Signed-off-by: Christos Gkekas
---
drivers/scsi/eata.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
index 6501c33..53a8fcd 100
Variable val is unsigned so checking whether it is less than zero is
redundant.
Signed-off-by: Christos Gkekas
---
drivers/net/wireless/ath/ath9k/debug.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/debug.c
b/drivers/net/wireless/ath
Variable val is unsigned so checking whether it is less than zero is
redundant.
Signed-off-by: Christos Gkekas
---
drivers/net/wireless/ath/ath10k/spectral.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/spectral.c
b/drivers/net
Many macros in dwmac-ipq806x are unused and should be removed.
Moreover gmac->id is an unsigned variable and therefore checking
whether it is less than zero is redundant.
Signed-off-by: Christos Gkekas
---
drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 14 +-
1 file chan
Variable reg is unsigned so checking whether it is less than zero is not
necessary.
Signed-off-by: Christos Gkekas
---
drivers/leds/leds-tca6507.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
index 45222a7..c12c16f
Variable byte_offset is unsigned so checking whether it is greater or
equal to zero is redundant.
Signed-off-by: Christos Gkekas
---
drivers/input/touchscreen/atmel_mxt_ts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c
b/drivers
Variable active_slots is unsigned so checking whether it is less than
zero is not necessary.
Signed-off-by: Christos Gkekas
---
sound/soc/bcm/cygnus-ssp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
index 15c438f
On 24/09/17 19:50:21 +0100, Christos Gkekas wrote:
> Current checks return VXGE_HW_BADCFG_RTS_MAC_EN if rts_mac_en is not
> equal to DISABLE *and* not equal to ENABLE. This condition is always
> false and the check should change to *or* to properly verify the value.
>
> Signed-o
Current checks return VXGE_HW_BADCFG_RTS_MAC_EN if rts_mac_en is not
equal to DISABLE *and* not equal to ENABLE. This condition is always
false and the check should change to *or* to properly verify the value.
Signed-off-by: Christos Gkekas
---
drivers/net/ethernet/neterion/vxge/vxge-config.c
Remove unnecessary comparisons of unsigned variables with zero.
Signed-off-by: Christos Gkekas
---
fs/cachefiles/daemon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
index 1ee54ff..ce072ce 100644
--- a/fs/cachefiles
cache->fstop_percent and cache->bstop_percent are unsigned so they are
always >= 0. There is no point in asserting this.
Signed-off-by: Christos Gkekas
---
fs/cachefiles/bind.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/cachefiles/bind.c b/fs/cachefil
Variables oldnamelen, oldprivatelen and oldlen are set but are never
used, thus they need to be cleaned up.
Signed-off-by: Christos Gkekas
---
fs/ncpfs/ioctl.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c
index 12550c2..85c6c60 100644
--- a/fs
new_ka.sa.sa_handler = compat_ptr(handler);
> #ifdef __ARCH_HAS_SA_RESTORER
> --
> 2.9.0
>
Thanks,
Acked-by: Christos Gkekas
stm32_spi_prepare_mbr() is returning an error value when div is less
than SPI_MBR_DIV_MIN *and* greater than SPI_MBR_DIV_MAX, which always
evaluates to false. This should change to use *or*.
Signed-off-by: Christos Gkekas
---
drivers/spi/spi-stm32.c | 4 ++--
1 file changed, 2 insertions(+), 2
Pointers bnx2i_cmd are set but never used, so they can be removed.
Signed-off-by: Christos Gkekas
---
drivers/scsi/bnx2i/bnx2i_hwi.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index 42921db..e3f22cb 100644
--- a
cache->fstop_percent and cache->bstop_percent are unsigned so they are
always >= 0. There is no point in asserting this.
Signed-off-by: Christos Gkekas
---
fs/cachefiles/bind.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/cachefiles/bind.c b/fs/cachefil
Variables oldnamelen, oldprivatelen and oldlen are set but are never
used, thus they need to be cleaned up.
Signed-off-by: Christos Gkekas
---
fs/ncpfs/ioctl.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c
index 12550c2..85c6c60 100644
--- a/fs
The value of variable 'can_recover' is never used after being set, thus
it should be removed.
Signed-off-by: Christos Gkekas
---
fs/btrfs/root-tree.c | 4
1 file changed, 4 deletions(-)
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index 95bcc3c..3338407 100644
---
Variable 'ret' in trace_events_hist is unused and should be removed.
Signed-off-by: Christos Gkekas
---
kernel/trace/trace_events_hist.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
ind
Remove unnecessary comparisons of unsigned variables with zero.
Signed-off-by: Christos Gkekas
---
fs/cachefiles/daemon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
index 1ee54ff..ce072ce 100644
--- a/fs/cachefiles
There are multiple unused variables struct TCP_Server_Info *server
defined in many methods in smb2pdu.c. They should be removed and related
logic simplified.
Signed-off-by: Christos Gkekas
---
fs/cifs/smb2pdu.c | 35 +++
1 file changed, 7 insertions(+), 28
Remove unnecessary comparisons of unsigned variables with zero.
Signed-off-by: Christos Gkekas
---
fs/cachefiles/daemon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
index 1ee54ff..ce072ce 100644
--- a/fs/cachefiles
verify_header() is currently checking whether interface version is less
than 5 *and* greater than 7, which always evaluates to false. Instead it
should check whether it is less than 5 *or* greater than 7.
Signed-off-by: Christos Gkekas
---
security/apparmor/policy_unpack.c | 2 +-
1 file
Variable mode in method wacom_show_remote_mode() is defined as u8, thus
statement (mode >= 0) is always true and should be removed, simplifying
the logic.
Signed-off-by: Christos Gkekas
---
drivers/hid/wacom_sys.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/driv
Variable mode in method wacom_show_remote_mode() is defined as u8, thus
statement (mode >= 0) is always true and should be removed, simplifying
the logic.
Signed-off-by: Christos Gkekas
---
drivers/hid/wacom_sys.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/driv
On 02/07/17 15:04:28 -0700, Joe Perches wrote:
> On Sun, 2017-07-02 at 22:54 +0100, Christos Gkekas wrote:
> > Variable mode in method wacom_show_remote_mode() is defined as u8, thus
> > statement (mode >= 0) is always true and should be removed, simplifying
> > the logi
Pointer hdr in netxen_setup_minidump() is set but never used, thus
should be removed.
Signed-off-by: Christos Gkekas
---
drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c
b/drivers/net
Variable mode in method wacom_show_remote_mode() is defined as u8, thus
statement (mode >= 0) is always true and should be removed, simplifying
the logic.
Signed-off-by: Christos Gkekas
---
drivers/hid/wacom_sys.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/driv
Variable idx is defined as u16 thus statement (idx < 0) is
always false and should be removed.
Signed-off-by: Christos Gkekas
---
drivers/scsi/qedi/qedi_fw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c
in
Variable opt in pptp_release() is set but never used, thus needs to be
removed.
Signed-off-by: Christos Gkekas
---
drivers/net/ppp/pptp.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
index 1951b10..5b0fd89 100644
--- a/drivers/net/ppp
61 matches
Mail list logo