Skip to content

Commit 47c2e30

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: Rename .device_configure() into .sdev_configure()
Improve naming consistency with the .sdev_prep() and .sdev_destroy() methods by renaming .device_configure() into .sdev_configure(). Cc: Christoph Hellwig <[email protected]> Acked-by: Damien Le Moal <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent ed63891 commit 47c2e30

28 files changed

+90
-96
lines changed

drivers/ata/ahci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ extern const struct attribute_group *ahci_sdev_groups[];
397397
.sdev_groups = ahci_sdev_groups, \
398398
.change_queue_depth = ata_scsi_change_queue_depth, \
399399
.tag_alloc_policy = BLK_TAG_ALLOC_RR, \
400-
.device_configure = ata_scsi_device_configure
400+
.sdev_configure = ata_scsi_sdev_configure
401401

402402
extern struct ata_port_operations ahci_ops;
403403
extern struct ata_port_operations ahci_platform_ops;

drivers/ata/libata-sata.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
13131313
EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);
13141314

13151315
/**
1316-
* ata_sas_device_configure - Default device_configure routine for libata
1316+
* ata_sas_sdev_configure - Default sdev_configure routine for libata
13171317
* devices
13181318
* @sdev: SCSI device to configure
13191319
* @lim: queue limits
@@ -1323,14 +1323,14 @@ EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);
13231323
* Zero.
13241324
*/
13251325

1326-
int ata_sas_device_configure(struct scsi_device *sdev, struct queue_limits *lim,
1327-
struct ata_port *ap)
1326+
int ata_sas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim,
1327+
struct ata_port *ap)
13281328
{
13291329
ata_scsi_sdev_config(sdev);
13301330

13311331
return ata_scsi_dev_config(sdev, lim, ap->link.device);
13321332
}
1333-
EXPORT_SYMBOL_GPL(ata_sas_device_configure);
1333+
EXPORT_SYMBOL_GPL(ata_sas_sdev_configure);
13341334

13351335
/**
13361336
* ata_sas_queuecmd - Issue SCSI cdb to libata-managed device

drivers/ata/libata-scsi.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ int ata_scsi_sdev_init(struct scsi_device *sdev)
11691169
EXPORT_SYMBOL_GPL(ata_scsi_sdev_init);
11701170

11711171
/**
1172-
* ata_scsi_device_configure - Set SCSI device attributes
1172+
* ata_scsi_sdev_configure - Set SCSI device attributes
11731173
* @sdev: SCSI device to examine
11741174
* @lim: queue limits
11751175
*
@@ -1181,8 +1181,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_sdev_init);
11811181
* Defined by SCSI layer. We don't really care.
11821182
*/
11831183

1184-
int ata_scsi_device_configure(struct scsi_device *sdev,
1185-
struct queue_limits *lim)
1184+
int ata_scsi_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
11861185
{
11871186
struct ata_port *ap = ata_shost_to_port(sdev->host);
11881187
struct ata_device *dev = __ata_scsi_find_dev(ap, sdev);
@@ -1192,7 +1191,7 @@ int ata_scsi_device_configure(struct scsi_device *sdev,
11921191

11931192
return 0;
11941193
}
1195-
EXPORT_SYMBOL_GPL(ata_scsi_device_configure);
1194+
EXPORT_SYMBOL_GPL(ata_scsi_sdev_configure);
11961195

11971196
/**
11981197
* ata_scsi_sdev_destroy - SCSI device is about to be destroyed

drivers/ata/pata_macio.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,8 @@ static void pata_macio_reset_hw(struct pata_macio_priv *priv, int resume)
812812
/* Hook the standard slave config to fixup some HW related alignment
813813
* restrictions
814814
*/
815-
static int pata_macio_device_configure(struct scsi_device *sdev,
816-
struct queue_limits *lim)
815+
static int pata_macio_sdev_configure(struct scsi_device *sdev,
816+
struct queue_limits *lim)
817817
{
818818
struct ata_port *ap = ata_shost_to_port(sdev->host);
819819
struct pata_macio_priv *priv = ap->private_data;
@@ -822,7 +822,7 @@ static int pata_macio_device_configure(struct scsi_device *sdev,
822822
int rc;
823823

824824
/* First call original */
825-
rc = ata_scsi_device_configure(sdev, lim);
825+
rc = ata_scsi_sdev_configure(sdev, lim);
826826
if (rc)
827827
return rc;
828828

@@ -932,7 +932,7 @@ static const struct scsi_host_template pata_macio_sht = {
932932
/* We may not need that strict one */
933933
.dma_boundary = ATA_DMA_BOUNDARY,
934934
.max_segment_size = PATA_MACIO_MAX_SEGMENT_SIZE,
935-
.device_configure = pata_macio_device_configure,
935+
.sdev_configure = pata_macio_sdev_configure,
936936
.sdev_groups = ata_common_sdev_groups,
937937
.can_queue = ATA_DEF_QUEUE,
938938
.tag_alloc_policy = BLK_TAG_ALLOC_RR,

drivers/ata/sata_mv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ static const struct scsi_host_template mv6_sht = {
673673
.sdev_groups = ata_ncq_sdev_groups,
674674
.change_queue_depth = ata_scsi_change_queue_depth,
675675
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
676-
.device_configure = ata_scsi_device_configure
676+
.sdev_configure = ata_scsi_sdev_configure
677677
};
678678

679679
static struct ata_port_operations mv5_ops = {

drivers/ata/sata_nv.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ static void nv_nf2_freeze(struct ata_port *ap);
296296
static void nv_nf2_thaw(struct ata_port *ap);
297297
static void nv_ck804_freeze(struct ata_port *ap);
298298
static void nv_ck804_thaw(struct ata_port *ap);
299-
static int nv_adma_device_configure(struct scsi_device *sdev,
300-
struct queue_limits *lim);
299+
static int nv_adma_sdev_configure(struct scsi_device *sdev,
300+
struct queue_limits *lim);
301301
static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc);
302302
static enum ata_completion_errors nv_adma_qc_prep(struct ata_queued_cmd *qc);
303303
static unsigned int nv_adma_qc_issue(struct ata_queued_cmd *qc);
@@ -319,8 +319,8 @@ static void nv_adma_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
319319
static void nv_mcp55_thaw(struct ata_port *ap);
320320
static void nv_mcp55_freeze(struct ata_port *ap);
321321
static void nv_swncq_error_handler(struct ata_port *ap);
322-
static int nv_swncq_device_configure(struct scsi_device *sdev,
323-
struct queue_limits *lim);
322+
static int nv_swncq_sdev_configure(struct scsi_device *sdev,
323+
struct queue_limits *lim);
324324
static int nv_swncq_port_start(struct ata_port *ap);
325325
static enum ata_completion_errors nv_swncq_qc_prep(struct ata_queued_cmd *qc);
326326
static void nv_swncq_fill_sg(struct ata_queued_cmd *qc);
@@ -382,7 +382,7 @@ static const struct scsi_host_template nv_adma_sht = {
382382
.can_queue = NV_ADMA_MAX_CPBS,
383383
.sg_tablesize = NV_ADMA_SGTBL_TOTAL_LEN,
384384
.dma_boundary = NV_ADMA_DMA_BOUNDARY,
385-
.device_configure = nv_adma_device_configure,
385+
.sdev_configure = nv_adma_sdev_configure,
386386
.sdev_groups = ata_ncq_sdev_groups,
387387
.change_queue_depth = ata_scsi_change_queue_depth,
388388
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
@@ -393,7 +393,7 @@ static const struct scsi_host_template nv_swncq_sht = {
393393
.can_queue = ATA_MAX_QUEUE - 1,
394394
.sg_tablesize = LIBATA_MAX_PRD,
395395
.dma_boundary = ATA_DMA_BOUNDARY,
396-
.device_configure = nv_swncq_device_configure,
396+
.sdev_configure = nv_swncq_sdev_configure,
397397
.sdev_groups = ata_ncq_sdev_groups,
398398
.change_queue_depth = ata_scsi_change_queue_depth,
399399
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
@@ -663,8 +663,8 @@ static void nv_adma_mode(struct ata_port *ap)
663663
pp->flags &= ~NV_ADMA_PORT_REGISTER_MODE;
664664
}
665665

666-
static int nv_adma_device_configure(struct scsi_device *sdev,
667-
struct queue_limits *lim)
666+
static int nv_adma_sdev_configure(struct scsi_device *sdev,
667+
struct queue_limits *lim)
668668
{
669669
struct ata_port *ap = ata_shost_to_port(sdev->host);
670670
struct nv_adma_port_priv *pp = ap->private_data;
@@ -676,7 +676,7 @@ static int nv_adma_device_configure(struct scsi_device *sdev,
676676
int adma_enable;
677677
u32 current_reg, new_reg, config_mask;
678678

679-
rc = ata_scsi_device_configure(sdev, lim);
679+
rc = ata_scsi_sdev_configure(sdev, lim);
680680

681681
if (sdev->id >= ATA_MAX_DEVICES || sdev->channel || sdev->lun)
682682
/* Not a proper libata device, ignore */
@@ -1871,8 +1871,8 @@ static void nv_swncq_host_init(struct ata_host *host)
18711871
writel(~0x0, mmio + NV_INT_STATUS_MCP55);
18721872
}
18731873

1874-
static int nv_swncq_device_configure(struct scsi_device *sdev,
1875-
struct queue_limits *lim)
1874+
static int nv_swncq_sdev_configure(struct scsi_device *sdev,
1875+
struct queue_limits *lim)
18761876
{
18771877
struct ata_port *ap = ata_shost_to_port(sdev->host);
18781878
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
@@ -1882,7 +1882,7 @@ static int nv_swncq_device_configure(struct scsi_device *sdev,
18821882
u8 check_maxtor = 0;
18831883
unsigned char model_num[ATA_ID_PROD_LEN + 1];
18841884

1885-
rc = ata_scsi_device_configure(sdev, lim);
1885+
rc = ata_scsi_sdev_configure(sdev, lim);
18861886
if (sdev->id >= ATA_MAX_DEVICES || sdev->channel || sdev->lun)
18871887
/* Not a proper libata device, ignore */
18881888
return rc;

drivers/ata/sata_sil24.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ static const struct scsi_host_template sil24_sht = {
381381
.tag_alloc_policy = BLK_TAG_ALLOC_FIFO,
382382
.sdev_groups = ata_ncq_sdev_groups,
383383
.change_queue_depth = ata_scsi_change_queue_depth,
384-
.device_configure = ata_scsi_device_configure
384+
.sdev_configure = ata_scsi_sdev_configure
385385
};
386386

387387
static struct ata_port_operations sil24_ops = {

drivers/firewire/sbp2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,8 +1506,8 @@ static int sbp2_scsi_sdev_init(struct scsi_device *sdev)
15061506
return 0;
15071507
}
15081508

1509-
static int sbp2_scsi_device_configure(struct scsi_device *sdev,
1510-
struct queue_limits *lim)
1509+
static int sbp2_scsi_sdev_configure(struct scsi_device *sdev,
1510+
struct queue_limits *lim)
15111511
{
15121512
struct sbp2_logical_unit *lu = sdev->hostdata;
15131513

@@ -1591,7 +1591,7 @@ static const struct scsi_host_template scsi_driver_template = {
15911591
.proc_name = "sbp2",
15921592
.queuecommand = sbp2_scsi_queuecommand,
15931593
.sdev_init = sbp2_scsi_sdev_init,
1594-
.device_configure = sbp2_scsi_device_configure,
1594+
.sdev_configure = sbp2_scsi_sdev_configure,
15951595
.eh_abort_handler = sbp2_scsi_abort,
15961596
.this_id = -1,
15971597
.sg_tablesize = SG_ALL,

drivers/scsi/hisi_sas/hisi_sas.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,7 @@ extern int hisi_sas_probe(struct platform_device *pdev,
644644
const struct hisi_sas_hw *ops);
645645
extern void hisi_sas_remove(struct platform_device *pdev);
646646

647-
int hisi_sas_device_configure(struct scsi_device *sdev,
648-
struct queue_limits *lim);
647+
int hisi_sas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim);
649648
extern int hisi_sas_sdev_init(struct scsi_device *sdev);
650649
extern int hisi_sas_scan_finished(struct Scsi_Host *shost, unsigned long time);
651650
extern void hisi_sas_scan_start(struct Scsi_Host *shost);

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -868,11 +868,10 @@ static int hisi_sas_dev_found(struct domain_device *device)
868868
return rc;
869869
}
870870

871-
int hisi_sas_device_configure(struct scsi_device *sdev,
872-
struct queue_limits *lim)
871+
int hisi_sas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
873872
{
874873
struct domain_device *dev = sdev_to_domain_dev(sdev);
875-
int ret = sas_device_configure(sdev, lim);
874+
int ret = sas_sdev_configure(sdev, lim);
876875

877876
if (ret)
878877
return ret;
@@ -881,7 +880,7 @@ int hisi_sas_device_configure(struct scsi_device *sdev,
881880

882881
return 0;
883882
}
884-
EXPORT_SYMBOL_GPL(hisi_sas_device_configure);
883+
EXPORT_SYMBOL_GPL(hisi_sas_sdev_configure);
885884

886885
void hisi_sas_scan_start(struct Scsi_Host *shost)
887886
{

0 commit comments

Comments
 (0)