[PATCH] scsi: scsi_transport_iscsi: use put_device() instead of kfree()

2018-03-07 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/scsi_transport_iscsi.c | 27 +-- 1 file c

[PATCH] target: tcm_loop: use put_device() if device_register fail

2018-03-07 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/target/loopback/tcm_loop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/target/loopback/tcm_loop.c b/d

[PATCH] scsi: scsi_transport_iscsi: fix spelling mistake: 'Cound' -> 'Could'

2017-10-29 Thread Arvind Yadav
Trivial fix to spelling mistakes in 'iscsi_get_host_stats'. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/scsi_transport_iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/driver

[PATCH 1/4] scsi: lasi700: constify parisc_device_id

2017-08-19 Thread Arvind Yadav
parisc_device_id are not supposed to change at runtime. All functions working with parisc_device_id provided by work with const parisc_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/lasi700.c | 2 +- 1 file chan

[PATCH 2/4] scsi: zalon: constify parisc_device_id

2017-08-19 Thread Arvind Yadav
parisc_device_id are not supposed to change at runtime. All functions working with parisc_device_id provided by work with const parisc_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/zalon.c | 2 +- 1 file chan

[PATCH 0/4] constify scsi/tty parisc_device_id

2017-08-19 Thread Arvind Yadav
parisc_device_id are not supposed to change at runtime. All functions working with parisc_device_id provided by work with const parisc_device_id. So mark the non-const structs as const. Arvind Yadav (4): [PATCH 1/4] scsi: lasi700: constify parisc_device_id [PATCH 2/4] scsi: zalon: constify

[PATCH 0/3] constify scsi vio_device_id

2017-08-17 Thread Arvind Yadav
vio_device_id are not supposed to change at runtime. All functions working with vio_device_id provided by work with const vio_device_id. So mark the non-const structs as const. Arvind Yadav (3): [PATCH 1/3] scsi: ibmvfc: constify vio_device_id [PATCH 2/3] scsi: ibmvscsi: constify

[PATCH 1/3] scsi: ibmvfc: constify vio_device_id

2017-08-17 Thread Arvind Yadav
vio_device_id are not supposed to change at runtime. All functions working with vio_device_id provided by work with const vio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file chan

[PATCH 3/3] scsi: ibmvscsi_tgt: constify vio_device_id

2017-08-17 Thread Arvind Yadav
vio_device_id are not supposed to change at runtime. All functions working with vio_device_id provided by work with const vio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-

[PATCH 2/3] scsi: ibmvscsi: constify vio_device_id

2017-08-17 Thread Arvind Yadav
vio_device_id are not supposed to change at runtime. All functions working with vio_device_id provided by work with const vio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 1 file chan

[PATCH] scsi: aha1542: constify pnp_device_id

2017-08-15 Thread Arvind Yadav
pnp_device_id are not supposed to change at runtime. All functions working with pnp_device_id provided by work with const pnp_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/aha1542.c | 2 +- 1 file changed, 1 ins

[PATCH] scsi: ncr5380: constify pnp_device_id

2017-08-15 Thread Arvind Yadav
pnp_device_id are not supposed to change at runtime. All functions working with pnp_device_id provided by work with const pnp_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/g_NCR5380.c | 2 +- 1 file chan

[PATCH 1/3] scsi: mptfusion: constify pci_device_id.

2017-08-02 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/message/fusion/mptspi.c | 2 +- 1 file chan

[PATCH 3/3] scsi: mptsas: constify pci_device_id.

2017-08-02 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/message/fusion/mptsas.c | 2 +- 1 file chan

[PATCH 2/3] scsi: mptfc: constify pci_device_id.

2017-08-02 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/message/fusion/mptfc.c | 2 +- 1 file chan

[PATCH 0/3] constify scsi pci_device_id.

2017-08-02 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Arvind Yadav (3): [PATCH 1/3] scsi: mptfusion: constify pci_device_id. [PATCH 2/3] scsi: mptfc: constify

Re: [PATCH 00/29] constify scsi pci_device_id.

2017-07-31 Thread Arvind Yadav
On Monday 31 July 2017 01:26 PM, Johannes Thumshirn wrote: On Sun, Jul 30, 2017 at 02:07:09PM +0530, Arvind Yadav wrote: pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs

[PATCH 22/29] scsi: pmcraid: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/pmcraid.c | 2 +- 1 file changed, 1 ins

[PATCH 23/29] scsi: fnic: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/fnic/fnic_main.c | 2 +- 1 file chan

[PATCH 24/29] scsi: stex: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/stex.c | 2 +- 1 file changed, 1 ins

[PATCH 28/29] scsi: atp870u: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/atp870u.c | 2 +- 1 file changed, 1 ins

[PATCH 27/29] scsi: advansys: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/advansys.c | 2 +- 1 file chan

[PATCH 25/29] scsi: megaraid: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-

[PATCH 26/29] scsi: a100u2w: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/a100u2w.c | 2 +- 1 file changed, 1 ins

[PATCH 29/29] scsi: 3w-xxxx: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/3w-.c | 2 +- 1 file changed, 1 ins

[PATCH 21/29] scsi: nsp32: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/nsp32.c | 2 +- 1 file changed, 1 ins

[PATCH 12/29] scsi: hptiop: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/hptiop.c | 2 +- 1 file changed, 1 ins

[PATCH 13/29] scsi: fdomain: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/fdomain.c | 2 +- 1 file changed, 1 ins

[PATCH 15/29] scsi: sym53c8xx_2: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +- 1 file c

[PATCH 14/29] scsi: snic: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/snic/snic_main.c | 2 +- 1 file chan

[PATCH 17/29] scsi: qla2xxx: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file chan

[PATCH 19/29] scsi: megaraid: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/megaraid.c | 2 +- 1 file chan

[PATCH 16/29] scsi: esas2r: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/esas2r/esas2r_main.c | 2 +- 1 file c

[PATCH 18/29] scsi: dmx3191d: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/dmx3191d.c | 2 +- 1 file chan

[PATCH 20/29] scsi: cxlflash: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/cxlflash/main.c | 2 +- 1 file chan

[PATCH 11/29] scsi: 3w-sas: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/3w-sas.c | 2 +- 1 file changed, 1 ins

[PATCH 03/29] scsi: am53c974: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/am53c974.c | 2 +- 1 file chan

[PATCH 01/29] scsi: qla1280: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 ins

[PATCH 02/29] scsi: qedi: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/qedi/qedi_main.c | 2 +- 1 file chan

[PATCH 04/29] scsi: pm8001: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/pm8001/pm8001_init.c | 2 +- 1 file c

[PATCH 07/29] scsi: 3w-9xxx: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/3w-9xxx.c | 2 +- 1 file changed, 1 ins

[PATCH 05/29] scsi: qla4xxx: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/qla4xxx/ql4_os.c | 2 +- 1 file chan

[PATCH 08/29] scsi: ipr: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/ipr.c | 2 +- 1 file changed, 1 ins

[PATCH 06/29] scsi: mvsas: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/mvsas/mv_init.c | 2 +- 1 file chan

[PATCH 09/29] scsi: arcmsr: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/arcmsr/arcmsr_hba.c | 2 +- 1 file chan

[PATCH 10/29] scsi: dpt_i2o: constify pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/dpt_i2o.c | 2 +- 1 file changed, 1 ins

[PATCH 00/29] constify scsi pci_device_id.

2017-07-30 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Arvind Yadav (29): [PATCH 01/29] scsi: qla1280: constify pci_device_id. [PATCH 02/29] scsi: qedi: constify

[PATCH 1/4] scsi: scsi_transport_iscsi: constify attribute_group structures.

2017-07-14 Thread Arvind Yadav
/scsi_transport_iscsi.o File size After adding 'const': textdata bss dec hex filename 40764 10070 44 50878c6be scsi/scsi_transport_iscsi.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/scsi_transport_iscsi.c | 12 ++--

[PATCH 3/4] scsi: scsi_transport_fc: constify attribute_group structures.

2017-07-14 Thread Arvind Yadav
drivers/scsi/scsi_transport_fc.o File size After adding 'const': textdata bss dec hex filename 341861868 4 360588cda drivers/scsi/scsi_transport_fc.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/scsi_transport_fc.c | 2 +-

[PATCH 4/4] scsi: scsi_transport_spi: constify attribute_group structures.

2017-07-14 Thread Arvind Yadav
drivers/scsi/scsi_transport_spi.o File size After adding 'const': textdata bss dec hex filename 155721488 0 1706042a4 drivers/scsi/scsi_transport_spi.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/scsi_transport_spi.c | 4 +

[PATCH 2/4] scsi: iscsi_boot_sysfs: constify attribute_group structures.

2017-07-14 Thread Arvind Yadav
drivers/scsi/iscsi_boot_sysfs.o File size After adding 'const': textdata bss dec hex filename 28041512 0431610dc drivers/scsi/iscsi_boot_sysfs.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/iscsi_boot_sysfs.c

[PATCH 0/4] constify scsi attribute_group structures.

2017-07-14 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. So mark the non-const structs as const. Arvind Yadav (4): [PATCH 1/4] scsi: scsi_transport_iscsi: constify attribute_group structures. [PATCH 2/4] scsi: iscsi_boot_sysfs: constify attribute_group structures. [PATCH 3/4] scsi

[PATCH] scsi: ibmvfc: constify dev_pm_ops structures.

2017-06-29 Thread Arvind Yadav
/ibmvfc.o File size After adding 'const': textdata bss dec hex filename 421291104 20 43253a8f5 drivers/scsi/ibmvscsi/ibmvfc.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion

[PATCH] scsi: ibmvscsi: constify dev_pm_ops structures.

2017-06-29 Thread Arvind Yadav
/ibmvscsi.o File size After adding 'const': textdata bss dec hex filename 181641264 8 194364bec drivers/scsi/ibmvscsi/ibmvscsi.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 1 file changed, 1 ins

[PATCH] block: cciss: constify cciss_host_attr_group and cciss_dev_attr_group

2017-06-22 Thread Arvind Yadav
File size before: textdata bss dec hex filename 409111432 304 42647a697 drivers/block/cciss.o File size After adding 'const': textdata bss dec hex filename 410391304 304 42647a697 drivers/block/cciss.o Signed-off-by: Arvind

[v1] scsi: qla2xxx: qla_mr:- Release and Unmap memory regions when an error occurred.

2017-01-04 Thread Arvind Yadav
Free memory regions, if qlafx00_iospace_config is not successful. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/scsi/qla2xxx/qla_mr.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/q