Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/iser: remove unused variable from iser_conn struct

max_sectors calculation was fixed in commit:
9c674815d346 ("IB/iser: Fix max_sectors calculation").
Thus, iser_conn variable scsi_max_sectors is not needed anymore.

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Tested-by: Raju Rangoju <rajur@chelsio.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>

authored by

Max Gurtovoy and committed by
Doug Ledford
83236f01 1e5db6c3

+5 -14
+4
drivers/infiniband/ulp/iser/iscsi_iser.c
··· 672 672 max_fr_sectors = ((shost->sg_tablesize - 1) * PAGE_SIZE) >> 9; 673 673 shost->max_sectors = min(iser_max_sectors, max_fr_sectors); 674 674 675 + iser_dbg("iser_conn %p, sg_tablesize %u, max_sectors %u\n", 676 + iser_conn, shost->sg_tablesize, 677 + shost->max_sectors); 678 + 675 679 if (cmds_max > max_cmds) { 676 680 iser_info("cmds_max changed from %u to %u\n", 677 681 cmds_max, max_cmds);
-2
drivers/infiniband/ulp/iser/iscsi_iser.h
··· 496 496 * @rx_descs: rx buffers array (cyclic buffer) 497 497 * @num_rx_descs: number of rx descriptors 498 498 * @scsi_sg_tablesize: scsi host sg_tablesize 499 - * @scsi_max_sectors: scsi host max sectors 500 499 */ 501 500 struct iser_conn { 502 501 struct ib_conn ib_conn; ··· 518 519 struct iser_rx_desc *rx_descs; 519 520 u32 num_rx_descs; 520 521 unsigned short scsi_sg_tablesize; 521 - unsigned int scsi_max_sectors; 522 522 bool snd_w_inv; 523 523 }; 524 524
+1 -12
drivers/infiniband/ulp/iser/iser_verbs.c
··· 707 707 sup_sg_tablesize = min_t(unsigned, ISCSI_ISER_MAX_SG_TABLESIZE, 708 708 device->ib_device->attrs.max_fast_reg_page_list_len); 709 709 710 - if (sg_tablesize > sup_sg_tablesize) { 711 - sg_tablesize = sup_sg_tablesize; 712 - iser_conn->scsi_max_sectors = sg_tablesize * SIZE_4K / 512; 713 - } else { 714 - iser_conn->scsi_max_sectors = max_sectors; 715 - } 716 - 717 - iser_conn->scsi_sg_tablesize = sg_tablesize; 718 - 719 - iser_dbg("iser_conn %p, sg_tablesize %u, max_sectors %u\n", 720 - iser_conn, iser_conn->scsi_sg_tablesize, 721 - iser_conn->scsi_max_sectors); 710 + iser_conn->scsi_sg_tablesize = min(sg_tablesize, sup_sg_tablesize); 722 711 } 723 712 724 713 /**