Re: [PATCH v5 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock

2017-06-12 Thread Arnd Bergmann
On Mon, Jun 12, 2017 at 10:26 AM, John Garry wrote: > On 10/06/2017 21:44, kbuild test robot wrote: > > > I don't think that reusing flags variable is in error, as there would be no > nested spinlock at this point within the function. > > If it is not recommended or not permitted to reuse flags va

Re: [PATCH v2 2/5] dt-bindings: scsi: ufs: add document for hi3660-ufs

2017-06-16 Thread Arnd Bergmann
On Fri, Jun 16, 2017 at 8:51 AM, Bu Tao wrote: > add ufs node document for hi3660 > > Signed-off-by: Bu Tao > --- > .../devicetree/bindings/ufs/hi3660-ufs.txt | 58 > ++ > 1 file changed, 58 insertions(+) > create mode 100644 Documentation/devicetree/bindings/ufs/hi

Re: [PATCH v2 2/5] dt-bindings: scsi: ufs: add document for hi3660-ufs

2017-06-22 Thread Arnd Bergmann
On Thu, Jun 22, 2017 at 1:44 PM, Bu Tao wrote: > 在 2017/6/17 5:51, Arnd Bergmann 写道: >> On Fri, Jun 16, 2017 at 8:51 AM, Bu Tao wrote: >>> +Optional properties for board device: >>> +- ufs-hi3660-use-rate-B: specifies UFS rate-B >>> +- ufs-hi3

Re: [PATCH v2 2/5] dt-bindings: scsi: ufs: add document for hi3660-ufs

2017-06-22 Thread Arnd Bergmann
On Thu, Jun 22, 2017 at 1:58 PM, Bu Tao wrote: > 在 2017/6/22 19:51, Arnd Bergmann 写道: >> On Thu, Jun 22, 2017 at 1:44 PM, Bu Tao wrote: >>> 在 2017/6/17 5:51, Arnd Bergmann 写道: >>>> On Fri, Jun 16, 2017 at 8:51 AM, Bu Tao wrote: >>> >>> I do no

[PATCH 1/2] scsi: qla2xxx: remove incorrect byte swap

2017-06-30 Thread Arnd Bergmann
rt registration") Signed-off-by: Arnd Bergmann --- drivers/scsi/qla2xxx/qla_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 1da8fa8f641d..14e25e32e622 100644 --- a/drivers/scsi/qla2xxx/q

[PATCH 2/2] scsi: qla2xxx: avoid unused-function warning

2017-06-30 Thread Arnd Bergmann
ctions without warning, and is nicer to read. Fixes: e84067d74301 ("scsi: qla2xxx: Add FC-NVMe F/W initialization and transport registration") Signed-off-by: Arnd Bergmann --- drivers/scsi/qla2xxx/Kconfig| 1 + drivers/scsi/qla2xxx/qla_nvme.c | 20 2 files changed

[PATCH 00/22] gcc-7 -Wformat-* warnings

2017-07-14 Thread Arnd Bergmann
review and apply as needed. Arnd Arnd Bergmann (22): kbuild: disable -Wformat-truncation warnings by default scsi: megaraid: fix format-overflow warning scsi: mpt3sas: fix format overflow warning scsi: fusion: fix string overflow warning scsi: gdth: avoid buffer overflow warni

[PATCH 04/22] scsi: fusion: fix string overflow warning

2017-07-14 Thread Arnd Bergmann
BASEDIR "/%s/summary", ioc->name); ^ drivers/message/fusion/mptbase.c:2103:2: note: 'sprintf' output between 13 and 44 bytes into a destination of size 32 We can simply double the size of the local buffer here to be on the safe side. Signed-off-by:

[PATCH 01/22] kbuild: disable -Wformat-truncation warnings by default

2017-07-14 Thread Arnd Bergmann
With x86 allmodconfig, we currently get 233 -Wformat-truncation warnings, which makes the entire warnings rather useless. This turns off the warning by default, unless we specify W=1 or higher Signed-off-by: Arnd Bergmann --- scripts/Makefile.extrawarn | 3 +++ 1 file changed, 3 insertions

[PATCH 02/22] scsi: megaraid: fix format-overflow warning

2017-07-14 Thread Arnd Bergmann
ng snprintf() instead, which shuts up that warning. Signed-off-by: Arnd Bergmann --- drivers/scsi/megaraid.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 3c63c292cb92..7195cff51d4c 100644 --- a/drivers/scsi/m

[PATCH 06/22] scsi: fnic: fix format string overflow warning

2017-07-14 Thread Arnd Bergmann
~~~ "%.11s-err-notify", fnic->name); This extends the buffer to fit any possible value. Signed-off-by: Arnd Bergmann --- drivers/scsi/fnic/fnic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h inde

[PATCH 12/22] vmxnet3: avoid format strint overflow warning

2017-07-14 Thread Arnd Bergmann
n of size 32 The current code is safe, but making the string a little longer is harmless and lets gcc see that it's ok. Signed-off-by: Arnd Bergmann --- drivers/net/vmxnet3/vmxnet3_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/vmxnet3/vmxnet3_int.h

[PATCH 09/22] net: niu: fix format string overflow warning:

2017-07-14 Thread Arnd Bergmann
8 bytes into a destination of size 6 While we know that the port number is small, there is no harm in making the format string two bytes longer to avoid the warning. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/sun/niu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 08/22] isdn: divert: fix sprintf buffer overflow warning

2017-07-14 Thread Arnd Bergmann
:488:4: note: 'sprintf' output 25 or more bytes (assuming 129) into a destination of size 90 This is unlikely to actually cause problems, so let's use snprintf as a simple workaround to shut up the warning and truncate the buffer instead. Signed-off-by: Arnd Be

[PATCH 15/22] hwmon: applesmc: fix format string overflow

2017-07-14 Thread Arnd Bergmann
four characters plus trailing zero, we know that the index has to be small here. I'm using snprintf() to avoid the warning. This would truncate the string instead of overflowing. Signed-off-by: Arnd Bergmann --- drivers/hwmon/applesmc.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH 17/22] platform/x86: alienware-wmi: fix format string overflow warning

2017-07-14 Thread Arnd Bergmann
/x86/alienware-wmi.c:461:3: note: 'sprintf' output between 7 and 13 bytes into a destination of size 10 While the zone should never be that large, it's easy to make the buffer a few bytes longer so gcc can prove this to be safe. Signed-off-by: Arnd Bergmann --- drivers/platf

[PATCH 16/22] x86: intel-mid: fix a format string overflow warning

2017-07-14 Thread Arnd Bergmann
; This makes it use an snprintf() to truncate the string if that happened rather than overflowing the stack. Signed-off-by: Arnd Bergmann --- arch/x86/platform/intel-mid/device_libs/platform_max7315.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/platform/i

[PATCH 21/22] fscache: fix fscache_objlist_show format processing

2017-07-14 Thread Arnd Bergmann
armless as no code sets a type other than 0 or 1, but it makes sense to use snprintf() here to avoid overflowing the array if that changes. Signed-off-by: Arnd Bergmann --- fs/fscache/object-list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fscache/object-list.c

[PATCH 19/22] block: DAC960: shut up format-overflow warning

2017-07-14 Thread Arnd Bergmann
ing that even incorrect data won't cause undefined behavior here. Signed-off-by: Arnd Bergmann --- drivers/block/DAC960.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 245a879b036e..255591ab3716 100644 --

[PATCH 22/22] IB/mlx4: fix sprintf format warning

2017-07-14 Thread Arnd Bergmann
c1e7e466120b ("IB/mlx4: Add iov directory in sysfs under the ib device") Signed-off-by: Arnd Bergmann --- drivers/infiniband/hw/mlx4/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx4/sysfs.c b/drivers/infiniband/hw/mlx4/sysfs.c inde

[PATCH 20/22] sound: pci: avoid string overflow warnings

2017-07-14 Thread Arnd Bergmann
ring. In this case, making the buffer a little longer is safe as the functions that take it as an argument all use length checking and the strings we pass into it are actually short enough. Signed-off-by: Arnd Bergmann --- sound/pci/mixart/mixart.h | 4 ++-- sound/pci/pcxhr/pcxhr.h | 4 ++-- sou

[PATCH 18/22] gpio: acpi: fix string overflow for large pin numbers

2017-07-14 Thread Arnd Bergmann
~~ pin); This can't be right, so this changes it to truncate the number to an 8-bit pin number. Fixes: 0d1c28a449c6 ("gpiolib-acpi: Add ACPI5 event model support to gpio.") Signed-off-by: Arnd Bergmann --- drivers/gpio/gpiolib-acpi.c | 2 +-

[PATCH 13/22] liquidio: fix possible eeprom format string overflow

2017-07-14 Thread Arnd Bergmann
7; output between 35 and 167 bytes into a destination of size 128 len = sprintf(buf, "boardname:%s serialnum:%s maj:%lld min:%lld\n", This extends it to 192 bytes, which is certainly enough. As far as I could tell, there are no other constraints that require a specific maximum siz

[PATCH 14/22] [media] usbvision-i2c: fix format overflow warning

2017-07-14 Thread Arnd Bergmann
#x27; output between 4 and 76 bytes into a destination of size 48 We know this is fine as the template name is always "usbvision", so we can easily avoid the warning by using this as the format string directly. Signed-off-by: Arnd Bergmann --- drivers/media/usb/usbvision/usbvisi

[PATCH 11/22] net: thunder_bgx: avoid format string overflow warning

2017-07-14 Thread Arnd Bergmann
nder_bgx.c:1020:3: note: 'sprintf' output between 16 and 27 bytes into a destination of size 20 This probably can't happen, but it can't hurt to make it long enough for the theoretical limit. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/cavium/thunder/thunder_bgx

[PATCH 10/22] bnx2x: fix format overflow warning

2017-07-14 Thread Arnd Bergmann
ion of size 5 There is a hard limit in place that makes the number at most two digits, so the code is fine. This changes it to use snprintf() to truncate instead of overflowing, which shuts up that warning. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtoo

[PATCH 05/22] scsi: gdth: avoid buffer overflow warning

2017-07-14 Thread Arnd Bergmann
t;,t); This won't happen in practice, so just use snprintf to truncate the string. Signed-off-by: Arnd Bergmann --- drivers/scsi/gdth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index facc7271f932..a4473356a9dc 100644 --- a/d

[PATCH 03/22] scsi: mpt3sas: fix format overflow warning

2017-07-14 Thread Arnd Bergmann
tring shorter is sufficient to avoid the warning here, as we know it can only contain either "mpt2sas" or "mpt3sas". Signed-off-by: Arnd Bergmann --- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sa

[PATCH 07/22] scsi: gdth: increase the procfs event buffer size

2017-07-14 Thread Arnd Bergmann
sprintf(buffer,"Adapter %d: %s\n", ^~ dvr->eu.async.ionode,dvr->event_string); ~~~ gcc calculates that the worst case buffer size would be 277 bytes, so we can use that. Signed-off-by: Arnd Bergma

Re: [PATCH 17/22] platform/x86: alienware-wmi: fix format string overflow warning

2017-07-14 Thread Arnd Bergmann
On Fri, Jul 14, 2017 at 9:18 PM, Andy Shevchenko wrote: > On Fri, Jul 14, 2017 at 3:07 PM, Arnd Bergmann wrote: >> gcc points out a possible format string overflow for a large value of 'zone': >> >> drivers/platform/x86/alienware-wmi.c: In function 'alienwar

Re: [PATCH 18/22] gpio: acpi: fix string overflow for large pin numbers

2017-07-14 Thread Arnd Bergmann
On Fri, Jul 14, 2017 at 2:52 PM, Andy Shevchenko wrote: > On Fri, 2017-07-14 at 14:07 +0200, Arnd Bergmann wrote: >> gcc-7 notices that the pin_table is an array of 16-bit numbers, >> but we assume it can be printed as a two-character hexadecimal >> string: >> >>

Re: [PATCH 04/22] scsi: fusion: fix string overflow warning

2017-07-17 Thread Arnd Bergmann
On Mon, Jul 17, 2017 at 11:17 AM, David Laight wrote: > From: Arnd Bergmann >> Sent: 14 July 2017 13:07 >> gcc points out a theorerical string overflow: >> >> drivers/message/fusion/mptbase.c: In function 'mpt_detach': >> drivers/message/fusion/mptbase.

[PATCH] [v2] scsi: fusion: fix string overflow warning

2017-07-17 Thread Arnd Bergmann
stead of sprintf() protects us if ioc->name was not terminated properly. Signed-off-by: Arnd Bergmann --- v2: also use snprintf --- drivers/message/fusion/mptbase.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fus

Re: [PATCH 14/22] [media] usbvision-i2c: fix format overflow warning

2017-07-17 Thread Arnd Bergmann
On Mon, Jul 17, 2017 at 2:53 PM, Hans Verkuil wrote: > On 14/07/17 14:07, Arnd Bergmann wrote: >> gcc-7 notices that we copy a fixed length string into another >> string of the same size, with additional characters: >> >> drivers/media/usb/usbvision/u

Re: [PATCH 20/22] sound: pci: avoid string overflow warnings

2017-07-18 Thread Arnd Bergmann
On Fri, Jul 14, 2017 at 2:28 PM, Takashi Iwai wrote: > On Fri, 14 Jul 2017 14:07:12 +0200, > > Thanks for the patch. I have seen it but ignored, so far, as not sure > which action is the best. An alternative solution is to use > snprintf() blindly, for example. > > For mixart, it's even better t

[PATCH] scsi: qedi: select CONFIG_ISCSI_BOOT_SYSFS

2017-07-21 Thread Arnd Bergmann
27; qedi_main.c:(.text+0x2e1c): undefined reference to `iscsi_boot_create_ethernet' This selects the Kconfig symbol like the other two users of that module do. Fixes: c57ec8fb7c02 ("scsi: qedi: Add support for Boot from SAN over iSCSI offload") Signed-off-by: Arnd Bergmann ---

[PATCH, RESEND] scsi: lpfc: fix linking against modular NVMe support

2017-07-21 Thread Arnd Bergmann
..@vger.kernel.org Link: https://patchwork.kernel.org/patch/9636569/ Signed-off-by: Arnd Bergmann --- I originally sent the patch in March 2013, the day after the broken patch made it into Linux-next. Unfortunately there was some misunderstanding about it (James Smart thought the broken patch wa

Re: [PATCH, RESEND] scsi: lpfc: fix linking against modular NVMe support

2017-07-26 Thread Arnd Bergmann
On Wed, Jul 26, 2017 at 11:16 AM, Arnd Bergmann wrote: > On Wed, Jul 26, 2017 at 11:08 AM, Johannes Thumshirn > wrote: >> On Fri, Jul 21, 2017 at 10:53:46PM +0200, Arnd Bergmann wrote: >>> I originally sent the patch in March 2013, the

Re: [PATCH, RESEND] scsi: lpfc: fix linking against modular NVMe support

2017-07-26 Thread Arnd Bergmann
On Wed, Jul 26, 2017 at 11:08 AM, Johannes Thumshirn wrote: > On Fri, Jul 21, 2017 at 10:53:46PM +0200, Arnd Bergmann wrote: >> I originally sent the patch in March 2013, the day after the broken >^ 2017? Oops. Let me resend that. >>

[PATCH] scsi: lpfc: avoid false-positive gcc-8 warning

2017-08-23 Thread Arnd Bergmann
e 'unsigned' is enough to shut up the warning, as gcc can then see that comparing eqidx to phba->io_channel_irqs is fine here. Signed-off-by: Arnd Bergmann --- drivers/scsi/lpfc/lpfc_debugfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/l

Re: [PATCH] scsi: lpfc: avoid false-positive gcc-8 warning

2017-08-23 Thread Arnd Bergmann
On Wed, Aug 23, 2017 at 5:01 PM, Arnd Bergmann wrote: > This is an interesting regression with gcc-8, showing a harmless > warning for correct code: > > In file included from include/linux/kernel.h:13:0, > ... > from drivers/scsi/lpfc/lpfc_debug

Re: [PATCH v2] scsi: lpfc: avoid false positive gcc-8 warning

2017-08-24 Thread Arnd Bergmann
On Thu, Aug 24, 2017 at 2:34 AM, James Smart wrote: > Arnd Bergmann, testing gcc-8, encountered the following: > >> This is an interesting regression with gcc-8, showing a harmless >> warning for correct code: >> >>In file included from include/linux/kernel.h:13:0

[PATCH v3 2/2] scsi: lpfc: avoid false-positive gcc-8 warning

2017-08-24 Thread Arnd Bergmann
: James Smart Link: [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81958 Signed-off-by: Arnd Bergmann --- drivers/scsi/lpfc/lpfc_debugfs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_debugfs.h b/drivers/scsi/lpfc/lpfc_debugfs.h index 7b7d314af

[PATCH 1/2] scsi: lpfc: avoid an unused function warning

2017-08-24 Thread Arnd Bergmann
places the preprocessor conditional with a C condition, so the compiler can see that the function is intentionally unused. Fixes: 9a38e4f1c82f ("scsi: lpfc: Fix MRQ > 1 context list handling") Signed-off-by: Arnd Bergmann --- drivers/scsi/lpfc/lpfc_nvmet.c | 5 +++-- 1 file changed, 3 ins

Re: [PATCH 11/11] compat_ioctl: move tape handling into drivers

2018-09-11 Thread Arnd Bergmann
On Tue, Sep 11, 2018 at 5:36 PM Arnd Bergmann wrote: > > On Sun, Sep 9, 2018 at 6:38 AM Al Viro wrote: > > > > On Sat, Sep 08, 2018 at 04:28:17PM +0200, Arnd Bergmann wrote: > > > MTIOCPOS and MTIOCGET are incompatible between 32-bit and 64-bit user > > >

[PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-12 Thread Arnd Bergmann
thing, but using the new generic_compat_ioctl_ptrarg helper makes it more correct in theory, and simplifies the code. Signed-off-by: Arnd Bergmann --- drivers/misc/cxl/flash.c| 8 +--- drivers/misc/genwqe/card_dev.c | 23 +-- drivers/scsi/megaraid/megaraid

[PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
e not interpreted as integer values. Signed-off-by: Arnd Bergmann --- drivers/android/binder.c| 2 +- drivers/crypto/qat/qat_common/adf_ctl_drv.c | 2 +- drivers/dma-buf/dma-buf.c | 4 +--- drivers/dma-buf/sw_sync.c | 2 +- drivers/dm

[PATCH v2 07/17] compat_ioctl: move tape handling into drivers

2018-09-12 Thread Arnd Bergmann
that is now in a new linux/mtio.h header that wraps the existing uapi/linux/mtio.h header and provides an abstraction to let drivers handle both cases easily. Signed-off-by: Arnd Bergmann --- drivers/ide/ide-tape.c| 31 +++ drivers/s390/char/tape_char.c | 41

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > > On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > > > > > > > Acked-by: Darren Hart (VMware) > >

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-24 Thread Arnd Bergmann
On Mon, Sep 24, 2018 at 10:35 PM Jason Gunthorpe wrote: > On Mon, Sep 24, 2018 at 10:18:52PM +0200, Arnd Bergmann wrote: > > On Tue, Sep 18, 2018 at 7:59 PM Jason Gunthorpe wrote: > > > On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > > > > On Fri, Se

Re: [PATCH] scsi: mptfusion: Remove unnecessary parentheses and simplify null checks

2018-10-02 Thread Arnd Bergmann
On Sat, Sep 15, 2018 at 8:38 AM Nathan Chancellor wrote: > Reported-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor > --- > drivers/message/fusion/mptbase.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/message/fusion/mptbase.c > b/drivers/messag

[PATCH] scsi: ufs: fix integer type usage in uapi header

2018-10-12 Thread Arnd Bergmann
2bf27a41 ("scsi: ufs: Add a bsg endpoint that supports UPIUs") Signed-off-by: Arnd Bergmann --- include/uapi/scsi/scsi_bsg_ufs.h | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/uapi/scsi/scsi_bsg_ufs.h b/include/uapi/scsi/scsi_bsg_ufs.h index 1b259306

scsi: myrs: warning fix, was: [GIT PULL] first round of SCSI updates for the 4.19+ merge window

2018-10-26 Thread Arnd Bergmann
On Wed, Oct 24, 2018 at 1:00 PM James Bottomley wrote: > > James Bottomley (1): > scsi: myrs: fix build failure on 32 bit Hi James and Hannes, Since James mentioned 32-bit compiles during the kernel summit, I'd like to confirm that I hit this on my randconfig builder now, with some latency

Re: scsi: myrs: warning fix, was: [GIT PULL] first round of SCSI updates for the 4.19+ merge window

2018-10-26 Thread Arnd Bergmann
On 10/26/18, Hannes Reinecke wrote: > On 10/26/18 10:16 AM, Arnd Bergmann wrote: >> On Wed, Oct 24, 2018 at 1:00 PM James Bottomley >> wrote: >>> >>> James Bottomley (1): >>>scsi: myrs: fix build failure on 32 bit >> >> Hi James a

[PATCH] cxgb4i: fix thermal configuration dependencies

2018-11-02 Thread Arnd Bergmann
'select NETDEVICES'. This is something we really should not do anyway, as a driver symbol should never select another major subsystem, so let's turn that into a 'depends on'. I don't see any downsides of that, as NETDEVICES is only disabled in rather obscure cases that

[PATCH] scsi: lpfc: fix remoteport access

2018-11-02 Thread Arnd Bergmann
;nrport' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (nrport->port_role & FC_PORT_ROLE_NVME_INITIATOR) This changes the logic back to what it was, while keeping the added spinlock. Fixes: 9e210178267b ("scsi: lpfc: Synchronize access to remoteport

[PATCH] scsi: myrb: fix sprintf buffer overflow warning

2018-11-02 Thread Arnd Bergmann
k after it that will bail out in case of out of range version numbers. This means we can simply use snprintf() instead of sprintf() to limit the output buffer size, and it will work correctly. Fixes: 081ff398c56c ("scsi: myrb: Add Mylex RAID controller (block interface)") Signed-off-by: A

[PATCH] scsi: myrs: avoid stack overflow warning

2018-11-02 Thread Arnd Bergmann
than 1024 bytes [-Werror=frame-larger-than=] We only really need three members of the structure, so just read them manually here instead of copying the entire structure. Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)") Signed-off-by: Arnd Bergmann --- driv

[PATCH] scsi: myrs: only build on little-endian platforms

2018-11-02 Thread Arnd Bergmann
never had a working driver on it for big-endian platforms, it's unlikely to make a difference to users. Signed-off-by: Arnd Bergmann --- drivers/scsi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index f07444d30b21..640cd1b31a18 100644

[PATCH] scsi: qla2xxx: fix unused function warning

2018-12-10 Thread Arnd Bergmann
or: unused variable 'status' [-Werror=unused-variable] Remove the variable again. Fixes: c4e521b654e1 ("scsi: qla2xxx: Split the __qla2x00_abort_all_cmds() function") Fixes: f2ffd4e5bc7b ("scsi: qla2xxx: Timeouts occur on surprise removal of QLogic adapter") Signe

Re: [PATCH] scsi: qla2xxx: fix unused function warning

2018-12-10 Thread Arnd Bergmann
On Mon, Dec 10, 2018 at 10:01 PM Bart Van Assche wrote: > > On Mon, 2018-12-10 at 21:51 +0100, Arnd Bergmann wrote: > > In what seems to be a mismatch between the scsi-fixes branch and > > the scsi-mkp/for-next branch, a newly introduced variable from > > one patch got

[PATCH 1/2] scsi: aacraid: change wait_sem to a completion

2018-12-10 Thread Arnd Bergmann
The wait_sem member is used like a completion, so we should use the respective API. The behavior is unchanged. Signed-off-by: Arnd Bergmann --- drivers/scsi/aacraid/aacraid.h | 2 +- drivers/scsi/aacraid/commctrl.c | 4 ++-- drivers/scsi/aacraid/commsup.c | 4 ++-- 3 files changed, 5

[PATCH 2/2] scsi: aacraid: change event_wait to a completion

2018-12-10 Thread Arnd Bergmann
The event_wait semaphore has completion semantics, so we can change it over to the completion interface for clarity without changing the behavior. Signed-off-by: Arnd Bergmann --- drivers/scsi/aacraid/aacraid.h | 3 ++- drivers/scsi/aacraid/commctrl.c | 1 - drivers/scsi/aacraid/commsup.c

Re: [PATCH V2 0/4] [SCSI] ufs: Adds glue drivers to ufshcd

2012-07-13 Thread Arnd Bergmann
and UPIU Acked-by: Arnd Bergmann -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH V2 0/4] [SCSI] ufs: Adds glue drivers to ufshcd

2012-07-16 Thread Arnd Bergmann
On Monday 16 July 2012, James Bottomley wrote: > On Fri, 2012-07-13 at 15:45 +0000, Arnd Bergmann wrote: > > On Friday 13 July 2012, Vinayak Holikatti wrote: > > > This patch set adds following features > > > - Seprates PCI specific code from ufshcd.c to make it as

Re: [PATCH V3 1/4] [SCSI] drivers/scsi/ufs: Seggregate PCI Specific Code

2012-08-01 Thread Arnd Bergmann
On Thursday 26 July 2012, Vinayak Holikatti wrote: > -static void ufshcd_remove(struct pci_dev *pdev) > +void ufshcd_remove(struct ufs_hba *hba) > { > - struct ufs_hba *hba = pci_get_drvdata(pdev); > - > /* disable interrupts */ > ufshcd_int_config(hba, UFSHCD_INT_DISABLE); > -

Re: [PATCH V3 2/4] [SCSI] drivers/scsi/ufs: Separate PCI code into glue driver

2012-08-01 Thread Arnd Bergmann
On Thursday 26 July 2012, Vinayak Holikatti wrote: > diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c > new file mode 100644 > index 000..d078744 > --- /dev/null > +++ b/drivers/scsi/ufs/ufshcd-pci.c > @@ -0,0 +1,228 @@ > +/* > + * Universal Flash Storage Host control

Re: [PATCH V3 0/4] [SCSI] ufs: Adds glue drivers to ufshcd

2012-08-01 Thread Arnd Bergmann
t transfer size in Command UPIU I've found a few trivial issues that I just replied on. Other than that, please add my Reviewed-by: Arnd Bergmann -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel

[PATCH 22/24] scsi: eesox: use __iomem pointers for MMIO

2012-09-14 Thread Arnd Bergmann
ARM is moving to stricter checks on readl/write functions, so we need to use the correct types everywhere. Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org Signed-off-by: Arnd Bergmann --- drivers/scsi/arm/eesox.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

Re: [PATCH 22/24] scsi: eesox: use __iomem pointers for MMIO

2012-09-15 Thread Arnd Bergmann
On Friday 14 September 2012, Russell King - ARM Linux wrote: > On Fri, Sep 14, 2012 at 11:34:50PM +0200, Arnd Bergmann wrote: > > ARM is moving to stricter checks on readl/write functions, > > so we need to use the correct types everywhere. > > There's nothing wrong with

Re: [PATCH 22/24] scsi: eesox: use __iomem pointers for MMIO

2012-09-15 Thread Arnd Bergmann
On Saturday 15 September 2012, Russell King - ARM Linux wrote: > On Sat, Sep 15, 2012 at 08:00:35AM +0000, Arnd Bergmann wrote: > > On Friday 14 September 2012, Russell King - ARM Linux wrote: > > > On Fri, Sep 14, 2012 at 11:34:50PM +0200, Arnd Bergmann wrote: > > >

Re: [PATCH 22/24] scsi: eesox: use __iomem pointers for MMIO

2012-09-18 Thread Arnd Bergmann
On Monday 17 September 2012, Russell King - ARM Linux wrote: > In both of my replies, I've said "as x86 does". We need to follow > x86's behaviour here, which is as I've quoted - it's not a matter > that "I need to make up my mind" - my mind is already well made up. > That is, we need to follow x8

[PATCH 04/16] SCSI: ARM: make fas216_dumpinfo function conditional

2012-10-05 Thread Arnd Bergmann
not used [-Wunused-function] Signed-off-by: Arnd Bergmann Cc: Russell King Cc: "James E.J. Bottomley" Cc: linux-arm-ker...@lists.infradead.org Cc: linux-scsi@vger.kernel.org --- drivers/scsi/arm/fas216.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 03/16] SCSI: ARM: ncr5380/oak uses no interrupts

2012-10-05 Thread Arnd Bergmann
kscsi_intr' defined but not used [-Wunused-function] Signed-off-by: Arnd Bergmann Cc: Russell King Cc: "James E.J. Bottomley" Cc: linux-arm-ker...@lists.infradead.org Cc: linux-scsi@vger.kernel.org --- drivers/scsi/arm/oak.c |1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH v2 2/8] SCSI: ARM: make fas216_dumpinfo function conditional

2012-10-09 Thread Arnd Bergmann
not used [-Wunused-function] Signed-off-by: Arnd Bergmann Cc: Russell King Cc: "James E.J. Bottomley" Cc: linux-arm-ker...@lists.infradead.org Cc: linux-scsi@vger.kernel.org --- drivers/scsi/arm/fas216.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 0/8] ARM: mostly harmless gcc warnings

2012-10-09 Thread Arnd Bergmann
ce is still to have them go through the subsystem maintainers. Olof: should we add it to for-next? Arnd Arnd Bergmann (8): SCSI: ARM: ncr5380/oak uses no interrupts SCSI: ARM: make fas216_dumpinfo function conditional mm/slob: use min_t() to compare ARCH_SLAB_MINALIGN USB: EHCI:

[PATCH v2 1/8] SCSI: ARM: ncr5380/oak uses no interrupts

2012-10-09 Thread Arnd Bergmann
kscsi_intr' defined but not used [-Wunused-function] Signed-off-by: Arnd Bergmann Cc: Russell King Cc: "James E.J. Bottomley" Cc: linux-arm-ker...@lists.infradead.org Cc: linux-scsi@vger.kernel.org --- drivers/scsi/arm/oak.c |1 + 1 file changed, 1 insertion(+) diff --git a

Re: [OPW kernel] [PATCH v2] scsi: ips.c: Use jiffies comparison instead of do_gettimeofday()

2014-10-20 Thread Arnd Bergmann
On Monday 20 October 2014 20:06:01 Ebru Akagunduz wrote: > do_gettimeofday() only can get 32-bit time types > but the driver should be able to use dates that are > after January 2038. > > Remove do_gettimeofday() and use > jiffies comparison to supply 64-bit time types. The description doesn't se

Re: next-20141126 build failures in wd719x

2014-11-26 Thread Arnd Bergmann
On Wednesday 26 November 2014 17:26:06 Mark Brown wrote: > On Wed, Nov 26, 2014 at 02:03:14PM +, Build bot for Mark Brown wrote: > > The wd719x driver fails to build on at least arm and arm64 in today's > -next since: > > > arm64-allmodconfig > > ../drivers/scsi/wd719x.c:247:2: error: i

[PATCH] SCSI: ips: remove pointless #warning

2015-01-13 Thread Arnd Bergmann
m prints a warning like this. Let's remove the warning now to reduce the amount of clutter. FWIW, I've reviewed the driver and found a few oddities, but nothing that needs to be fixed or that would be architecture specific. Signed-off-by: Arnd Bergmann diff --git a/drivers/scsi/ips.c b/driv

[PATCH] SCSI: initio: remove duplicate module device table

2015-01-13 Thread Arnd Bergmann
built-in: drivers/scsi/initio.c:131:29: warning: 'i91u_pci_devices' defined but not used [-Wunused-variable] This removes the extraneous table and the warning. Signed-off-by: Arnd Bergmann Fixes: 72d39fea901 ("[SCSI] initio: Convert into a real Linux driver and update to modern styl

[PATCH 1/2] scsi: lpfc: avoid harmless comparison warning

2016-06-15 Thread Arnd Bergmann
er but still lets it do the constant-folding. Signed-off-by: Arnd Bergmann --- drivers/scsi/lpfc/lpfc_attr.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index cfec2eca4dd3..3e1d2e669902 100644 --

[PATCH 2/2] scsi: wd7000: print sector number as 64-bit

2016-06-15 Thread Arnd Bergmann
t when building with "-Wextra", which warned about an empty else clause in } else dprintk("ok!\n"); Signed-off-by: Arnd Bergmann --- Not Cc'ing Miroslav Zagorac , that address bounces with "Requested action not taken: mailbox unavailable invalid

Re: [PATCH 2/2] scsi: wd7000: print sector number as 64-bit

2016-06-17 Thread Arnd Bergmann
On Friday, June 17, 2016 1:36:52 AM CEST kbuild test robot wrote: > > All warnings (new ones prefixed by >>): > >drivers/scsi/wd7000.c: In function 'mail_out': >drivers/scsi/wd7000.c:915:44: warning: cast from pointer to integer of > different size [-Wpointer-to-int-cast] >any2sc

[PATCH] scsi: libfc: fix seconds_since_last_reset calculation

2016-06-17 Thread Arnd Bergmann
also avoids a problem that causes the seconds_since_last_reset value to be incorrect if jiffies has overrun since the 'boot_time' value was recorded. Signed-off-by: Arnd Bergmann --- drivers/scsi/libfc/fc_lport.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dr

Re: [PATCH] scsi: libfc: fix seconds_since_last_reset calculation

2016-06-20 Thread Arnd Bergmann
On Monday, June 20, 2016 3:54:06 PM CEST Bart Van Assche wrote: > On 06/17/2016 05:47 PM, Arnd Bergmann wrote: > > - jiffies_to_timespec(jiffies, &v0); > > - jiffies_to_timespec(lport->boot_time, &v1); > > - fc_stats->seconds_since_

[PATCH v2] scsi: wd7000: print sector number as 64-bit

2016-06-21 Thread Arnd Bergmann
t when building with "-Wextra", which warned about an empty else clause in } else dprintk("ok!\n"); Signed-off-by: Arnd Bergmann --- v2: use %llu instead of %lld and use 'u64' instead of 's64' because sector_t is unsigned. drive

Re: [PATCH 2/2] scsi: wd7000: print sector number as 64-bit

2016-06-21 Thread Arnd Bergmann
On Monday, June 20, 2016 9:12:50 PM CEST Martin K. Petersen wrote: > >>>>> "Arnd" == Arnd Bergmann writes: > > As sector_t can be 32-bit wide, this adds a cast to 'u64' and prints > that with the correct format. The change to use no_printk() > &

Re: [Y2038] [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros

2016-06-21 Thread Arnd Bergmann
On Monday, June 20, 2016 11:03:01 AM CEST you wrote: > On Sun, Jun 19, 2016 at 5:26 PM, Deepa Dinamani > wrote: > > The series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC > > macros. > Gcc handles 8-byte structure returns (on most architectures) by > returning them as two 32-bi

Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug

2016-06-22 Thread Arnd Bergmann
On Wednesday, June 22, 2016 11:24:50 AM CEST Tomas Winkler wrote: > On Tue, Jun 21, 2016 at 12:02 PM, Tomas Winkler wrote: > > On Tue, May 3, 2016 at 9:36 AM, Arnd Bergmann wrote: > >> On Monday 02 May 2016 16:32:25 Andrew Morton wrote: > >> #ifdef __HAVE_BUIL

Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug

2016-06-22 Thread Arnd Bergmann
On Wednesday, June 22, 2016 2:44:21 PM CEST Tomas Winkler wrote: > > > > There are more than 20 files that have the statement: case cpu_to_... > > Sparse complains about: case __builtin_bswap, not about > > __builtin_constant_p. > > There is even much more in the header files used in initializer

[PATCH] target/iblock: use ilog2 to compute block size

2016-06-22 Thread Arnd Bergmann
of-two value, we can turn the expensive 64-bit division into a simpler variable bit shift. Signed-off-by: Arnd Bergmann --- drivers/target/target_core_iblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target

Re: [PATCH v2 19/24] fnic: Use time64_t to represent trace timestamps

2016-06-22 Thread Arnd Bergmann
On Sunday, June 19, 2016 5:27:18 PM CEST Deepa Dinamani wrote: > trace timestamps use struct timespec and CURRENT_TIME which > are not y2038 safe. > These timestamps are only part of the trace log on the machine > and are not shared with the fnic. > Replace then with y2038 safe struct timespec64 an

Re: [Y2038] [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros

2016-06-22 Thread Arnd Bergmann
in their place. And, these are y2038 safe. > > Thanks to Arnd Bergmann for all the guidance and discussions. > > Patches 2-4 were mostly generated using coccinelle scripts. > > All filesystem timestamps use current_fs_time() for right granularity as > mentioned in the respe

Re: [PATCH] target/iblock: use ilog2 to compute block size

2016-06-22 Thread Arnd Bergmann
On Wednesday, June 22, 2016 6:38:09 AM CEST Christoph Hellwig wrote: > This doesn't compute the block size, it computes the number of block > in a block device. Right, that's at least what I planned to put in the $subject ;-) > I think it would be useful to add a generic helper > (e.g. in blkdev

Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug

2016-06-23 Thread Arnd Bergmann
On Thursday, June 23, 2016 9:27:30 AM CEST Tomas Winkler wrote: > On Wed, Jun 22, 2016 at 3:25 PM, Arnd Bergmann wrote: > > On Wednesday, June 22, 2016 2:44:21 PM CEST Tomas Winkler wrote: > >> > > >> > There are more than 20 files that have the statement: case c

[PATCH v2 1/3] block: provide helpers for reading block count

2016-06-23 Thread Arnd Bergmann
elper functions mirroring the bdev_logical_block_size() and bdev_physical_block_size() interfaces for the block size. Signed-off-by: Arnd Bergmann Suggested-by: Christoph Hellwig --- include/linux/blkdev.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/linux/blkde

[PATCH v2 3/3] target/iblock: use bdev_logical_block_count()

2016-06-23 Thread Arnd Bergmann
introduced a better bdev_logical_block_count() now, so we can use that here. Signed-off-by: Arnd Bergmann --- drivers/target/target_core_iblock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.

[PATCH v2 2/3] partition/efi: use bdev_logical_block_count()

2016-06-23 Thread Arnd Bergmann
gcc not behaving in the expected ways with __builtin_constant_p(), but it also points to somewhat inefficient code based on a 64-bit division. I have introduced a better bdev_logical_block_count() now, so we can use that here. Signed-off-by: Arnd Bergmann --- block/partitions/efi.c | 4 ++-

[PATCH 4/5] bfa: remove unused functions from fbbuild.c

2016-08-02 Thread Arnd Bergmann
x27;static __maybe_unused' to keep the source code around but shrink the object code by leaving them out. Signed-off-by: Arnd Bergmann --- drivers/scsi/bfa/bfa_fcbuild.c | 607 - drivers/scsi/bfa/bfa_fcbuild.h | 87 -- 2 files changed, 694 deletions(-

<    1   2   3   4   5   >