From patchwork Mon Jul 6 12:33:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11645595 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AE487739 for ; Mon, 6 Jul 2020 12:33:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80C1F20715 for ; Mon, 6 Jul 2020 12:33:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="kWlP8xsn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729046AbgGFMds (ORCPT ); Mon, 6 Jul 2020 08:33:48 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37661 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbgGFMds (ORCPT ); Mon, 6 Jul 2020 08:33:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594038827; x=1625574827; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=NIQsmB1kblJujQxWmJSldWGOHufZEaU48EJh+lCs+ls=; b=kWlP8xsntUS1h3OsXOf7VnAIjJR/wZFftihnjrI1VeOr7WuC0ZW46SPi UtpW7OrPVx5mC9I2kZRxhJPiX33lKpTE19+dU72x1JVFSYlV6FgeXQO6D SlrKUQaM/4KFJoRya8v4FzR73KfTuzTxNLZM61lZY6EPVDGRaPaq0T4jd poKJza2qPC1SN3hb6MxAvuzAUBuDiqBAnKee2ZoBZGjMQyYRh1JUiBHfG nsxmoSeANIR6WnpWweMWepxY1B5Eexdm6K9RIZlFbjb6RgHuRsATPwSlB ijgF1guX10QO8k4ZwgvTxIiEN9sSu13KOo+BTnzExGO8f+PiJGQcGZjGm g==; IronPort-SDR: 41kYxp/PcqcGnKaBBJX2kxTPgZoM1BbgAjvYIkWhMZfUxbK1Y0+7dErIaLlIRJq09nz2dbWdV1 VEarThQ5vxILyT4v7BeOzOLekiKVu/KXctGMBLo45EroAdCvh4WoWMITh+VYCwYHJ8tr/YrNGz 8CXyN1SRIw2bUyduzqxNgPVUzVFlyBn157EmXStSZEXgnhZGHSwkV5wPkL95tnh8CngNLkXyP0 kfN/GNxiaJ2mXdM+bLrFKML3nyUkwq8vpiRzkCIH1Vbvt9jQugVwW3HAIWaqTtTgP2GMhEoL+g uY8= X-IronPort-AV: E=Sophos;i="5.75,318,1589212800"; d="scan'208";a="146052057" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Jul 2020 20:33:47 +0800 IronPort-SDR: wrnREQa6q8DWYLPs223mCD/TYr7vqsGRu7pWkS8vfeCxpBDIjZTneRrtG9pxrtEfF6pUfvwEXB MBpXrYIn7sfAYHn6VY/QmWvZMKxBmhegY= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 05:21:55 -0700 IronPort-SDR: jSl5huCefDsYODd4Y37p1edkr53aT49QVNwR//kGnAsj2KMeuc1fQgX1xbMxBjj09nBmdGZCQL Ui7E3a0VeNUQ== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2020 05:33:46 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" Subject: [PATCH 01/10] scsi: megaraid: Fix kdoc comments format Date: Mon, 6 Jul 2020 21:33:45 +0900 Message-Id: <20200706123345.451783-1-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix kernel documentation comments to avoid various warnings when compiling with W=1. No functional changes. Signed-off-by: Damien Le Moal --- drivers/scsi/megaraid.c | 206 ++++++++++---------- drivers/scsi/megaraid/megaraid_mbox.c | 4 +- drivers/scsi/megaraid/megaraid_mm.c | 1 - drivers/scsi/megaraid/megaraid_sas_base.c | 171 +++++++++------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 78 +++++--- 5 files changed, 250 insertions(+), 210 deletions(-) diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index f27ffd088c8a..07ce31c546ba 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -124,7 +124,7 @@ static int trace_level; /** * mega_setup_mailbox() - * @adapter - pointer to our soft state + * @adapter: pointer to our soft state * * Allocates a 8 byte aligned memory for the handshake mailbox. */ @@ -347,7 +347,7 @@ mega_query_adapter(adapter_t *adapter) /** * mega_runpendq() - * @adapter - pointer to our soft state + * @adapter: pointer to our soft state * * Runs through the list of pending requests. */ @@ -413,8 +413,8 @@ static DEF_SCSI_QCMD(megaraid_queue) /** * mega_allocate_scb() - * @adapter - pointer to our soft state - * @cmd - scsi command from the mid-layer + * @adapter: pointer to our soft state + * @cmd: scsi command from the mid-layer * * Allocate a SCB structure. This is the central structure for controller * commands. @@ -444,9 +444,9 @@ mega_allocate_scb(adapter_t *adapter, struct scsi_cmnd *cmd) /** * mega_get_ldrv_num() - * @adapter - pointer to our soft state - * @cmd - scsi mid layer command - * @channel - channel on the controller + * @adapter: pointer to our soft state + * @cmd: scsi mid layer command + * @channel: channel on the controller * * Calculate the logical drive number based on the information in scsi command * and the channel number. @@ -503,9 +503,9 @@ mega_get_ldrv_num(adapter_t *adapter, struct scsi_cmnd *cmd, int channel) /** * mega_build_cmd() - * @adapter - pointer to our soft state - * @cmd - Prepare using this scsi command - * @busy - busy flag if no resources + * @adapter: pointer to our soft state + * @cmd: Prepare using this scsi command + * @busy: busy flag if no resources * * Prepares a command and scatter gather list for the controller. This routine * also finds out if the commands is intended for a logical drive or a @@ -937,11 +937,11 @@ mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy) /** * mega_prepare_passthru() - * @adapter - pointer to our soft state - * @scb - our scsi control block - * @cmd - scsi command from the mid-layer - * @channel - actual channel on the controller - * @target - actual id on the controller. + * @adapter: pointer to our soft state + * @scb: our scsi control block + * @cmd: scsi command from the mid-layer + * @channel: actual channel on the controller + * @target: actual id on the controller. * * prepare a command for the scsi physical devices. */ @@ -1000,11 +1000,11 @@ mega_prepare_passthru(adapter_t *adapter, scb_t *scb, struct scsi_cmnd *cmd, /** * mega_prepare_extpassthru() - * @adapter - pointer to our soft state - * @scb - our scsi control block - * @cmd - scsi command from the mid-layer - * @channel - actual channel on the controller - * @target - actual id on the controller. + * @adapter: pointer to our soft state + * @scb: our scsi control block + * @cmd: scsi command from the mid-layer + * @channel: actual channel on the controller + * @target: actual id on the controller. * * prepare a command for the scsi physical devices. This rountine prepares * commands for devices which can take extended CDBs (>10 bytes) @@ -1085,8 +1085,8 @@ __mega_runpendq(adapter_t *adapter) /** * issue_scb() - * @adapter - pointer to our soft state - * @scb - scsi control block + * @adapter: pointer to our soft state + * @scb: scsi control block * * Post a command to the card if the mailbox is available, otherwise return * busy. We also take the scb from the pending list if the mailbox is @@ -1166,8 +1166,8 @@ mega_busywait_mbox (adapter_t *adapter) /** * issue_scb_block() - * @adapter - pointer to our soft state - * @raw_mbox - the mailbox + * @adapter: pointer to our soft state + * @raw_mbox: the mailbox * * Issue a scb in synchronous and non-interrupt mode */ @@ -1247,8 +1247,8 @@ issue_scb_block(adapter_t *adapter, u_char *raw_mbox) /** * megaraid_isr_iomapped() - * @irq - irq - * @devp - pointer to our soft state + * @irq: irq + * @devp: pointer to our soft state * * Interrupt service routine for io-mapped controllers. * Find out if our device is interrupting. If yes, acknowledge the interrupt @@ -1323,8 +1323,8 @@ megaraid_isr_iomapped(int irq, void *devp) /** * megaraid_isr_memmapped() - * @irq - irq - * @devp - pointer to our soft state + * @irq: irq + * @devp: pointer to our soft state * * Interrupt service routine for memory-mapped controllers. * Find out if our device is interrupting. If yes, acknowledge the interrupt @@ -1401,10 +1401,10 @@ megaraid_isr_memmapped(int irq, void *devp) } /** * mega_cmd_done() - * @adapter - pointer to our soft state - * @completed - array of ids of completed commands - * @nstatus - number of completed commands - * @status - status of the last command completed + * @adapter: pointer to our soft state + * @completed: array of ids of completed commands + * @nstatus: number of completed commands + * @status: status of the last command completed * * Complete the commands and call the scsi mid-layer callback hooks. */ @@ -1921,9 +1921,9 @@ megaraid_reset(struct scsi_cmnd *cmd) /** * megaraid_abort_and_reset() - * @adapter - megaraid soft state - * @cmd - scsi command to be aborted or reset - * @aor - abort or reset flag + * @adapter: megaraid soft state + * @cmd: scsi command to be aborted or reset + * @aor: abort or reset flag * * Try to locate the scsi command in the pending queue. If found and is not * issued to the controller, abort/reset it. Otherwise return failure @@ -2021,8 +2021,8 @@ free_local_pdev(struct pci_dev *pdev) /** * mega_allocate_inquiry() - * @dma_handle - handle returned for dma address - * @pdev - handle to pci device + * @dma_handle: handle returned for dma address + * @pdev: handle to pci device * * allocates memory for inquiry structure */ @@ -2045,8 +2045,8 @@ mega_free_inquiry(void *inquiry, dma_addr_t dma_handle, struct pci_dev *pdev) /** * proc_show_config() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display configuration information about the controller. */ @@ -2109,8 +2109,8 @@ proc_show_config(struct seq_file *m, void *v) /** * proc_show_stat() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display statistical information about the I/O activity. */ @@ -2143,8 +2143,8 @@ proc_show_stat(struct seq_file *m, void *v) /** * proc_show_mbox() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display mailbox information for the last command issued. This information * is good for debugging. @@ -2171,8 +2171,8 @@ proc_show_mbox(struct seq_file *m, void *v) /** * proc_show_rebuild_rate() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display current rebuild rate */ @@ -2214,8 +2214,8 @@ proc_show_rebuild_rate(struct seq_file *m, void *v) /** * proc_show_battery() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display information about the battery module on the controller. */ @@ -2317,9 +2317,9 @@ mega_print_inquiry(struct seq_file *m, char *scsi_inq) /** * proc_show_pdrv() - * @m - Synthetic file construction data - * @page - buffer to write the data in - * @adapter - pointer to our soft state + * @m: Synthetic file construction data + * @adapter: pointer to our soft state + * @channel: channel * * Display information about the physical drives. */ @@ -2433,8 +2433,8 @@ proc_show_pdrv(struct seq_file *m, adapter_t *adapter, int channel) /** * proc_show_pdrv_ch0() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display information about the physical drives on physical channel 0. */ @@ -2447,8 +2447,8 @@ proc_show_pdrv_ch0(struct seq_file *m, void *v) /** * proc_show_pdrv_ch1() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display information about the physical drives on physical channel 1. */ @@ -2461,8 +2461,8 @@ proc_show_pdrv_ch1(struct seq_file *m, void *v) /** * proc_show_pdrv_ch2() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display information about the physical drives on physical channel 2. */ @@ -2475,8 +2475,8 @@ proc_show_pdrv_ch2(struct seq_file *m, void *v) /** * proc_show_pdrv_ch3() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display information about the physical drives on physical channel 3. */ @@ -2489,10 +2489,10 @@ proc_show_pdrv_ch3(struct seq_file *m, void *v) /** * proc_show_rdrv() - * @m - Synthetic file construction data - * @adapter - pointer to our soft state - * @start - starting logical drive to display - * @end - ending logical drive to display + * @m: Synthetic file construction data + * @adapter: pointer to our soft state + * @start: starting logical drive to display + * @end: ending logical drive to display * * We do not print the inquiry information since its already available through * /proc/scsi/scsi interface @@ -2674,8 +2674,8 @@ proc_show_rdrv(struct seq_file *m, adapter_t *adapter, int start, int end ) /** * proc_show_rdrv_10() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display real time information about the logical drives 0 through 9. */ @@ -2688,8 +2688,8 @@ proc_show_rdrv_10(struct seq_file *m, void *v) /** * proc_show_rdrv_20() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display real time information about the logical drives 0 through 9. */ @@ -2702,8 +2702,8 @@ proc_show_rdrv_20(struct seq_file *m, void *v) /** * proc_show_rdrv_30() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display real time information about the logical drives 0 through 9. */ @@ -2716,8 +2716,8 @@ proc_show_rdrv_30(struct seq_file *m, void *v) /** * proc_show_rdrv_40() - * @m - Synthetic file construction data - * @v - File iterator + * @m: Synthetic file construction data + * @v: File iterator * * Display real time information about the logical drives 0 through 9. */ @@ -2729,8 +2729,8 @@ proc_show_rdrv_40(struct seq_file *m, void *v) /** * mega_create_proc_entry() - * @index - index in soft state array - * @parent - parent node for this /proc entry + * @index: index in soft state array + * @parent: parent node for this /proc entry * * Creates /proc entries for our controllers. */ @@ -2785,7 +2785,7 @@ static inline void mega_create_proc_entry(int index, struct proc_dir_entry *pare #endif -/** +/* * megaraid_biosparam() * * Return the disk geometry for a particular disk @@ -2854,7 +2854,7 @@ megaraid_biosparam(struct scsi_device *sdev, struct block_device *bdev, /** * mega_init_scb() - * @adapter - pointer to our soft state + * @adapter: pointer to our soft state * * Allocate memory for the various pointers in the scb structures: * scatter-gather list pointer, passthru and extended passthru structure @@ -2934,8 +2934,8 @@ mega_init_scb(adapter_t *adapter) /** * megadev_open() - * @inode - unused - * @filep - unused + * @inode: unused + * @filep: unused * * Routines for the character/ioctl interface to the driver. Find out if this * is a valid open. @@ -2954,10 +2954,9 @@ megadev_open (struct inode *inode, struct file *filep) /** * megadev_ioctl() - * @inode - Our device inode - * @filep - unused - * @cmd - ioctl command - * @arg - user buffer + * @filep: Our device file + * @cmd: ioctl command + * @arg: user buffer * * ioctl entry point for our private ioctl interface. We move the data in from * the user space, prepare the command (if necessary, convert the old MIMD @@ -3370,8 +3369,8 @@ megadev_unlocked_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) /** * mega_m_to_n() - * @arg - user address - * @uioc - new ioctl structure + * @arg: user address + * @uioc: new ioctl structure * * A thin layer to convert older mimd interface ioctl structure to NIT ioctl * structure @@ -3498,8 +3497,8 @@ mega_m_to_n(void __user *arg, nitioctl_t *uioc) /* * mega_n_to_m() - * @arg - user address - * @mc - mailbox command + * @arg: user address + * @mc: mailbox command * * Updates the status information to the application, depending on application * conforms to older mimd ioctl interface or newer NIT ioctl interface @@ -3565,7 +3564,7 @@ mega_n_to_m(void __user *arg, megacmd_t *mc) /** * mega_is_bios_enabled() - * @adapter - pointer to our soft state + * @adapter: pointer to our soft state * * issue command to find out if the BIOS is enabled for this controller */ @@ -3596,7 +3595,7 @@ mega_is_bios_enabled(adapter_t *adapter) /** * mega_enum_raid_scsi() - * @adapter - pointer to our soft state + * @adapter: pointer to our soft state * * Find out what channels are RAID/SCSI. This information is used to * differentiate the virtual channels and physical channels and to support @@ -3651,7 +3650,7 @@ mega_enum_raid_scsi(adapter_t *adapter) /** * mega_get_boot_drv() - * @adapter - pointer to our soft state + * @adapter: pointer to our soft state * * Find out which device is the boot device. Note, any logical drive or any * phyical device (e.g., a CDROM) can be designated as a boot device. @@ -3718,7 +3717,7 @@ mega_get_boot_drv(adapter_t *adapter) /** * mega_support_random_del() - * @adapter - pointer to our soft state + * @adapter: pointer to our soft state * * Find out if this controller supports random deletion and addition of * logical drives @@ -3748,7 +3747,7 @@ mega_support_random_del(adapter_t *adapter) /** * mega_support_ext_cdb() - * @adapter - pointer to our soft state + * @adapter: pointer to our soft state * * Find out if this firmware support cdblen > 10 */ @@ -3776,8 +3775,8 @@ mega_support_ext_cdb(adapter_t *adapter) /** * mega_del_logdrv() - * @adapter - pointer to our soft state - * @logdrv - logical drive to be deleted + * @adapter: pointer to our soft state + * @logdrv: logical drive to be deleted * * Delete the specified logical drive. It is the responsibility of the user * app to let the OS know about this operation. @@ -3862,7 +3861,7 @@ mega_do_del_logdrv(adapter_t *adapter, int logdrv) /** * mega_get_max_sgl() - * @adapter - pointer to our soft state + * @adapter: pointer to our soft state * * Find out the maximum number of scatter-gather elements supported by this * version of the firmware @@ -3908,7 +3907,7 @@ mega_get_max_sgl(adapter_t *adapter) /** * mega_support_cluster() - * @adapter - pointer to our soft state + * @adapter: pointer to our soft state * * Find out if this firmware support cluster calls. */ @@ -3950,8 +3949,8 @@ mega_support_cluster(adapter_t *adapter) #ifdef CONFIG_PROC_FS /** * mega_adapinq() - * @adapter - pointer to our soft state - * @dma_handle - DMA address of the buffer + * @adapter: pointer to our soft state + * @dma_handle: DMA address of the buffer * * Issue internal commands while interrupts are available. * We only issue direct mailbox commands from within the driver. ioctl() @@ -3983,11 +3982,12 @@ mega_adapinq(adapter_t *adapter, dma_addr_t dma_handle) } -/** mega_internal_dev_inquiry() - * @adapter - pointer to our soft state - * @ch - channel for this device - * @tgt - ID of this device - * @buf_dma_handle - DMA address of the buffer +/** + * mega_internal_dev_inquiry() + * @adapter: pointer to our soft state + * @ch: channel for this device + * @tgt: ID of this device + * @buf_dma_handle: DMA address of the buffer * * Issue the scsi inquiry for the specified device. */ @@ -4056,9 +4056,9 @@ mega_internal_dev_inquiry(adapter_t *adapter, u8 ch, u8 tgt, /** * mega_internal_command() - * @adapter - pointer to our soft state - * @mc - the mailbox command - * @pthru - Passthru structure for DCDB commands + * @adapter: pointer to our soft state + * @mc: the mailbox command + * @pthru: Passthru structure for DCDB commands * * Issue the internal commands in interrupt mode. * The last argument is the address of the passthru structure if the command diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 8f918df631bf..19469a2c0ea3 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -3304,7 +3304,6 @@ megaraid_mbox_fire_sync_cmd(adapter_t *adapter) * megaraid_mbox_display_scb - display SCB information, mostly debug purposes * @adapter : controller's soft state * @scb : SCB to be displayed - * @level : debug level for console print * * Diplay information about the given SCB iff the current debug level is * verbose. @@ -3972,7 +3971,8 @@ megaraid_sysfs_get_ldmap(adapter_t *adapter) /** * megaraid_sysfs_show_app_hndl - display application handle for this adapter - * @cdev : class device object representation for the host + * @dev : class device object representation for the host + * @attr : device attribute (unused) * @buf : buffer to send data to * * Display the handle used by the applications while executing management diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c index e83163c66884..8df53446641a 100644 --- a/drivers/scsi/megaraid/megaraid_mm.c +++ b/drivers/scsi/megaraid/megaraid_mm.c @@ -95,7 +95,6 @@ mraid_mm_open(struct inode *inode, struct file *filep) /** * mraid_mm_ioctl - module entry-point for ioctls - * @inode : inode (ignored) * @filep : file operations pointer (ignored) * @cmd : ioctl command * @arg : user ioctl packet diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 00668335c2af..2fda0dca122a 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -427,14 +427,14 @@ megasas_decode_evt(struct megasas_instance *instance) evt_detail->description); } -/** -* The following functions are defined for xscale -* (deviceid : 1064R, PERC5) controllers -*/ +/* + * The following functions are defined for xscale + * (deviceid : 1064R, PERC5) controllers + */ /** * megasas_enable_intr_xscale - Enables interrupts - * @regs: MFI register set + * @instance: Adapter soft state */ static inline void megasas_enable_intr_xscale(struct megasas_instance *instance) @@ -450,7 +450,7 @@ megasas_enable_intr_xscale(struct megasas_instance *instance) /** * megasas_disable_intr_xscale -Disables interrupt - * @regs: MFI register set + * @instance: Adapter soft state */ static inline void megasas_disable_intr_xscale(struct megasas_instance *instance) @@ -466,7 +466,7 @@ megasas_disable_intr_xscale(struct megasas_instance *instance) /** * megasas_read_fw_status_reg_xscale - returns the current FW status value - * @regs: MFI register set + * @instance: Adapter soft state */ static u32 megasas_read_fw_status_reg_xscale(struct megasas_instance *instance) @@ -475,7 +475,7 @@ megasas_read_fw_status_reg_xscale(struct megasas_instance *instance) } /** * megasas_clear_interrupt_xscale - Check & clear interrupt - * @regs: MFI register set + * @instance: Adapter soft state */ static int megasas_clear_intr_xscale(struct megasas_instance *instance) @@ -509,9 +509,10 @@ megasas_clear_intr_xscale(struct megasas_instance *instance) /** * megasas_fire_cmd_xscale - Sends command to the FW - * @frame_phys_addr : Physical address of cmd - * @frame_count : Number of frames for the command - * @regs : MFI register set + * @instance: Adapter soft state + * @frame_phys_addr : Physical address of cmd + * @frame_count : Number of frames for the command + * @regs : MFI register set */ static inline void megasas_fire_cmd_xscale(struct megasas_instance *instance, @@ -529,7 +530,8 @@ megasas_fire_cmd_xscale(struct megasas_instance *instance, /** * megasas_adp_reset_xscale - For controller reset - * @regs: MFI register set + * @instance: Adapter soft state + * @regs: MFI register set */ static int megasas_adp_reset_xscale(struct megasas_instance *instance, @@ -570,7 +572,8 @@ megasas_adp_reset_xscale(struct megasas_instance *instance, /** * megasas_check_reset_xscale - For controller reset check - * @regs: MFI register set + * @instance: Adapter soft state + * @regs: MFI register set */ static int megasas_check_reset_xscale(struct megasas_instance *instance, @@ -599,19 +602,19 @@ static struct megasas_instance_template megasas_instance_template_xscale = { .issue_dcmd = megasas_issue_dcmd, }; -/** -* This is the end of set of functions & definitions specific -* to xscale (deviceid : 1064R, PERC5) controllers -*/ +/* + * This is the end of set of functions & definitions specific + * to xscale (deviceid : 1064R, PERC5) controllers + */ -/** -* The following functions are defined for ppc (deviceid : 0x60) -* controllers -*/ +/* + * The following functions are defined for ppc (deviceid : 0x60) + * controllers + */ /** * megasas_enable_intr_ppc - Enables interrupts - * @regs: MFI register set + * @instance: Adapter soft state */ static inline void megasas_enable_intr_ppc(struct megasas_instance *instance) @@ -629,7 +632,7 @@ megasas_enable_intr_ppc(struct megasas_instance *instance) /** * megasas_disable_intr_ppc - Disable interrupt - * @regs: MFI register set + * @instance: Adapter soft state */ static inline void megasas_disable_intr_ppc(struct megasas_instance *instance) @@ -645,7 +648,7 @@ megasas_disable_intr_ppc(struct megasas_instance *instance) /** * megasas_read_fw_status_reg_ppc - returns the current FW status value - * @regs: MFI register set + * @instance: Adapter soft state */ static u32 megasas_read_fw_status_reg_ppc(struct megasas_instance *instance) @@ -655,7 +658,7 @@ megasas_read_fw_status_reg_ppc(struct megasas_instance *instance) /** * megasas_clear_interrupt_ppc - Check & clear interrupt - * @regs: MFI register set + * @instance: Adapter soft state */ static int megasas_clear_intr_ppc(struct megasas_instance *instance) @@ -688,9 +691,10 @@ megasas_clear_intr_ppc(struct megasas_instance *instance) /** * megasas_fire_cmd_ppc - Sends command to the FW - * @frame_phys_addr : Physical address of cmd - * @frame_count : Number of frames for the command - * @regs : MFI register set + * @instance: Adapter soft state + * @frame_phys_addr: Physical address of cmd + * @frame_count: Number of frames for the command + * @regs: MFI register set */ static inline void megasas_fire_cmd_ppc(struct megasas_instance *instance, @@ -708,7 +712,8 @@ megasas_fire_cmd_ppc(struct megasas_instance *instance, /** * megasas_check_reset_ppc - For controller reset check - * @regs: MFI register set + * @instance: Adapter soft state + * @regs: MFI register set */ static int megasas_check_reset_ppc(struct megasas_instance *instance, @@ -738,7 +743,7 @@ static struct megasas_instance_template megasas_instance_template_ppc = { /** * megasas_enable_intr_skinny - Enables interrupts - * @regs: MFI register set + * @instance: Adapter soft state */ static inline void megasas_enable_intr_skinny(struct megasas_instance *instance) @@ -756,7 +761,7 @@ megasas_enable_intr_skinny(struct megasas_instance *instance) /** * megasas_disable_intr_skinny - Disables interrupt - * @regs: MFI register set + * @instance: Adapter soft state */ static inline void megasas_disable_intr_skinny(struct megasas_instance *instance) @@ -772,7 +777,7 @@ megasas_disable_intr_skinny(struct megasas_instance *instance) /** * megasas_read_fw_status_reg_skinny - returns the current FW status value - * @regs: MFI register set + * @instance: Adapter soft state */ static u32 megasas_read_fw_status_reg_skinny(struct megasas_instance *instance) @@ -782,7 +787,7 @@ megasas_read_fw_status_reg_skinny(struct megasas_instance *instance) /** * megasas_clear_interrupt_skinny - Check & clear interrupt - * @regs: MFI register set + * @instance: Adapter soft state */ static int megasas_clear_intr_skinny(struct megasas_instance *instance) @@ -825,9 +830,10 @@ megasas_clear_intr_skinny(struct megasas_instance *instance) /** * megasas_fire_cmd_skinny - Sends command to the FW - * @frame_phys_addr : Physical address of cmd - * @frame_count : Number of frames for the command - * @regs : MFI register set + * @instance: Adapter soft state + * @frame_phys_addr: Physical address of cmd + * @frame_count: Number of frames for the command + * @regs: MFI register set */ static inline void megasas_fire_cmd_skinny(struct megasas_instance *instance, @@ -847,7 +853,8 @@ megasas_fire_cmd_skinny(struct megasas_instance *instance, /** * megasas_check_reset_skinny - For controller reset check - * @regs: MFI register set + * @instance: Adapter soft state + * @regs: MFI register set */ static int megasas_check_reset_skinny(struct megasas_instance *instance, @@ -876,14 +883,14 @@ static struct megasas_instance_template megasas_instance_template_skinny = { }; -/** -* The following functions are defined for gen2 (deviceid : 0x78 0x79) -* controllers -*/ +/* + * The following functions are defined for gen2 (deviceid : 0x78 0x79) + * controllers + */ /** * megasas_enable_intr_gen2 - Enables interrupts - * @regs: MFI register set + * @instance: Adapter soft state */ static inline void megasas_enable_intr_gen2(struct megasas_instance *instance) @@ -902,7 +909,7 @@ megasas_enable_intr_gen2(struct megasas_instance *instance) /** * megasas_disable_intr_gen2 - Disables interrupt - * @regs: MFI register set + * @instance: Adapter soft state */ static inline void megasas_disable_intr_gen2(struct megasas_instance *instance) @@ -918,7 +925,7 @@ megasas_disable_intr_gen2(struct megasas_instance *instance) /** * megasas_read_fw_status_reg_gen2 - returns the current FW status value - * @regs: MFI register set + * @instance: Adapter soft state */ static u32 megasas_read_fw_status_reg_gen2(struct megasas_instance *instance) @@ -928,7 +935,7 @@ megasas_read_fw_status_reg_gen2(struct megasas_instance *instance) /** * megasas_clear_interrupt_gen2 - Check & clear interrupt - * @regs: MFI register set + * @instance: Adapter soft state */ static int megasas_clear_intr_gen2(struct megasas_instance *instance) @@ -961,11 +968,13 @@ megasas_clear_intr_gen2(struct megasas_instance *instance) return mfiStatus; } + /** * megasas_fire_cmd_gen2 - Sends command to the FW - * @frame_phys_addr : Physical address of cmd - * @frame_count : Number of frames for the command - * @regs : MFI register set + * @instance: Adapter soft state + * @frame_phys_addr: Physical address of cmd + * @frame_count: Number of frames for the command + * @regs: MFI register set */ static inline void megasas_fire_cmd_gen2(struct megasas_instance *instance, @@ -983,7 +992,8 @@ megasas_fire_cmd_gen2(struct megasas_instance *instance, /** * megasas_adp_reset_gen2 - For controller reset - * @regs: MFI register set + * @instance: Adapter soft state + * @reg_set: MFI register set */ static int megasas_adp_reset_gen2(struct megasas_instance *instance, @@ -1043,7 +1053,8 @@ megasas_adp_reset_gen2(struct megasas_instance *instance, /** * megasas_check_reset_gen2 - For controller reset check - * @regs: MFI register set + * @instance: Adapter soft state + * @regs: MFI register set */ static int megasas_check_reset_gen2(struct megasas_instance *instance, @@ -1071,10 +1082,10 @@ static struct megasas_instance_template megasas_instance_template_gen2 = { .issue_dcmd = megasas_issue_dcmd, }; -/** -* This is the end of set of functions & definitions -* specific to gen2 (deviceid : 0x78, 0x79) controllers -*/ +/* + * This is the end of set of functions & definitions + * specific to gen2 (deviceid : 0x78, 0x79) controllers + */ /* * Template added for TB (Fusion) @@ -1609,7 +1620,7 @@ megasas_build_ldio(struct megasas_instance *instance, struct scsi_cmnd *scp, /** * megasas_cmd_type - Checks if the cmd is for logical drive/sysPD * and whether it's RW or non RW - * @scmd: SCSI command + * @cmd: SCSI command * */ inline int megasas_cmd_type(struct scsi_cmnd *cmd) @@ -1749,8 +1760,8 @@ megasas_build_and_issue_cmd(struct megasas_instance *instance, /** * megasas_queue_command - Queue entry point + * @shost: adapter SCSI host * @scmd: SCSI command to be queued - * @done: Callback entry point */ static int megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) @@ -2916,11 +2927,7 @@ megasas_dump(void *buf, int sz, int format) /** * megasas_dump_reg_set - This function will print hexdump of register set - * @buf: Buffer to be dumped - * @sz: Size in bytes - * @format: Different formats of dumping e.g. format=n will - * cause only 'n' 32 bit words to be dumped in a - * single line. + * @reg_set: Register set to be dumped */ inline void megasas_dump_reg_set(void __iomem *reg_set) @@ -2997,6 +3004,7 @@ megasas_dump_sys_regs(void __iomem *reg_set, char *buf) /** * megasas_reset_bus_host - Bus & host reset handler entry point + * @scmd: Mid-layer SCSI command */ static int megasas_reset_bus_host(struct scsi_cmnd *scmd) { @@ -3777,7 +3785,7 @@ megasas_issue_pending_cmds_again(struct megasas_instance *instance) megasas_register_aen(instance, seq_num, class_locale.word); } -/** +/* * Move the internal reset pending commands to a deferred queue. * * We move the commands pending at internal reset time to a @@ -3785,7 +3793,7 @@ megasas_issue_pending_cmds_again(struct megasas_instance *instance) * completion of the internal reset sequence. if the internal reset * did not complete in time, the kernel reset handler would flush * these commands. - **/ + */ static void megasas_internal_reset_defer_cmds(struct megasas_instance *instance) { @@ -3963,8 +3971,11 @@ megasas_deplete_reply_queue(struct megasas_instance *instance, tasklet_schedule(&instance->isr_tasklet); return IRQ_HANDLED; } + /** * megasas_isr - isr entry point + * @irq: IRQ number + * @devp: IRQ context address */ static irqreturn_t megasas_isr(int irq, void *devp) { @@ -3986,6 +3997,7 @@ static irqreturn_t megasas_isr(int irq, void *devp) /** * megasas_transition_to_ready - Move the FW to READY state * @instance: Adapter soft state + * @ocr: Adapter reset state * * During the initialization, FW passes can potentially be in any one of * several possible states. If the FW in operational, waiting-for-handshake @@ -4743,7 +4755,7 @@ megasas_get_ld_list(struct megasas_instance *instance) /** * megasas_ld_list_query - Returns FW's ld_list structure * @instance: Adapter soft state - * @ld_list: ld_list structure + * @query_type: ld_list structure type * * Issues an internal command (DCMD) to get the FW's controller PD * list structure. This information is mainly used to find out SYSTEM @@ -5653,7 +5665,6 @@ megasas_destroy_irqs(struct megasas_instance *instance) { /** * megasas_setup_jbod_map - setup jbod map for FP seq_number. * @instance: Adapter soft state - * @is_probe: Driver probe check * * Return 0 on success. */ @@ -6494,7 +6505,7 @@ megasas_get_seq_num(struct megasas_instance *instance, * megasas_register_aen - Registers for asynchronous event notification * @instance: Adapter soft state * @seq_num: The starting sequence number - * @class_locale: Class of the event + * @class_locale_word: Class of the event * * This function subscribes for AEN for events beyond the @seq_num. It requests * to be notified if and only if the event is of type @class_locale @@ -7014,8 +7025,9 @@ static inline void megasas_free_ctrl_mem(struct megasas_instance *instance) * megasas_alloc_ctrl_dma_buffers - Allocate consistent DMA buffers during * driver load time * - * @instance- Adapter soft instance - * @return- O for SUCCESS + * @instance: Adapter soft instance + * + * @return: O for SUCCESS */ static inline int megasas_alloc_ctrl_dma_buffers(struct megasas_instance *instance) @@ -7931,7 +7943,7 @@ static void megasas_detach_one(struct pci_dev *pdev) /** * megasas_shutdown - Shutdown entry point - * @device: Generic device structure + * @pdev: Generic device structure */ static void megasas_shutdown(struct pci_dev *pdev) { @@ -7956,8 +7968,10 @@ static void megasas_shutdown(struct pci_dev *pdev) pci_free_irq_vectors(instance->pdev); } -/** +/* * megasas_mgmt_open - char node "open" entry point + * @inode: char node inode + * @filep: char node file */ static int megasas_mgmt_open(struct inode *inode, struct file *filep) { @@ -7970,8 +7984,11 @@ static int megasas_mgmt_open(struct inode *inode, struct file *filep) return 0; } -/** +/* * megasas_mgmt_fasync - Async notifier registration from applications + * @fd: char node file descriptor number + * @filep: char node file + * @mode: notifier on/off * * This function adds the calling process to a driver global queue. When an * event occurs, SIGIO will be sent to all processes in this queue. @@ -7997,9 +8014,11 @@ static int megasas_mgmt_fasync(int fd, struct file *filep, int mode) return rc; } -/** +/* * megasas_mgmt_poll - char node "poll" entry point - * */ + * @filep: char node file + * @wait: Events to poll for + */ static __poll_t megasas_mgmt_poll(struct file *file, poll_table *wait) { __poll_t mask; @@ -8057,7 +8076,8 @@ static int megasas_set_crash_dump_params_ioctl(struct megasas_cmd *cmd) /** * megasas_mgmt_fw_ioctl - Issues management ioctls to FW * @instance: Adapter soft state - * @argp: User's ioctl packet + * @user_ioc: User's ioctl packet + * @ioc: ioctl packet */ static int megasas_mgmt_fw_ioctl(struct megasas_instance *instance, @@ -8397,6 +8417,9 @@ static int megasas_mgmt_ioctl_aen(struct file *file, unsigned long arg) /** * megasas_mgmt_ioctl - char node ioctl entry point + * @file: char device file pointer + * @cmd: ioctl command + * @arg: ioctl command arguments address */ static long megasas_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 319f241da4b6..c4f15a52f86b 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -90,9 +90,9 @@ extern u32 megasas_readl(struct megasas_instance *instance, /** * megasas_adp_reset_wait_for_ready - initiate chip reset and wait for * controller to come to ready state - * @instance - adapter's soft state - * @do_adp_reset - If true, do a chip reset - * @ocr_context - If called from OCR context this will + * @instance: adapter's soft state + * @do_adp_reset: If true, do a chip reset + * @ocr_context: If called from OCR context this will * be set to 1, else 0 * * This function initates a chip reset followed by a wait for controller to @@ -146,10 +146,10 @@ megasas_adp_reset_wait_for_ready(struct megasas_instance *instance, /** * megasas_check_same_4gb_region - check if allocation * crosses same 4GB boundary or not - * @instance - adapter's soft instance - * start_addr - start address of DMA allocation - * size - size of allocation in bytes - * return - true : allocation does not cross same + * @instance: adapter's soft instance + * @start_addr: start address of DMA allocation + * @size: size of allocation in bytes + * @return: true : allocation does not cross same * 4GB boundary * false: allocation crosses same * 4GB boundary @@ -174,7 +174,7 @@ static inline bool megasas_check_same_4gb_region /** * megasas_enable_intr_fusion - Enables interrupts - * @regs: MFI register set + * @instance: adapter's soft instance */ static void megasas_enable_intr_fusion(struct megasas_instance *instance) @@ -196,7 +196,7 @@ megasas_enable_intr_fusion(struct megasas_instance *instance) /** * megasas_disable_intr_fusion - Disables interrupt - * @regs: MFI register set + * @instance: adapter's soft instance */ static void megasas_disable_intr_fusion(struct megasas_instance *instance) @@ -238,6 +238,7 @@ megasas_clear_intr_fusion(struct megasas_instance *instance) /** * megasas_get_cmd_fusion - Get a command from the free pool * @instance: Adapter soft state + * @blk_tag: Command tag * * Returns a blk_tag indexed mpt frame */ @@ -309,8 +310,8 @@ megasas_fire_cmd_fusion(struct megasas_instance *instance, /** * megasas_fusion_update_can_queue - Do all Adapter Queue depth related calculations here - * @instance: Adapter soft state - * fw_boot_context: Whether this function called during probe or after OCR + * @instance: Adapter soft state + * @fw_boot_context: Whether this function called during probe or after OCR * * This function is only for fusion controllers. * Update host can queue, if firmware downgrade max supported firmware commands. @@ -1016,6 +1017,7 @@ megasas_alloc_cmds_fusion(struct megasas_instance *instance) * wait_and_poll - Issues a polling command * @instance: Adapter soft state * @cmd: Command packet to be issued + * @seconds: Maximum poll time * * For polling, MFI requires the cmd_status to be set to 0xFF before posting. */ @@ -1906,6 +1908,7 @@ megasas_init_adapter_fusion(struct megasas_instance *instance) /** * megasas_fault_detect_work - Worker function of * FW fault handling workqueue. + * @work: FW fault work struct */ static void megasas_fault_detect_work(struct work_struct *work) @@ -1989,11 +1992,13 @@ megasas_fusion_stop_watchdog(struct megasas_instance *instance) /** * map_cmd_status - Maps FW cmd status to OS cmd status - * @cmd : Pointer to cmd - * @status : status of cmd returned by FW - * @ext_status : ext status of cmd returned by FW + * @fusion: fusion context + * @scmd: Pointer to cmd + * @status: status of cmd returned by FW + * @ext_status: ext status of cmd returned by FW + * @data_length: command data length + * @sense: command sense data */ - static void map_cmd_status(struct fusion_context *fusion, struct scsi_cmnd *scmd, u8 status, u8 ext_status, @@ -2234,7 +2239,7 @@ megasas_make_prp_nvme(struct megasas_instance *instance, struct scsi_cmnd *scmd, * @scp: SCSI command from the mid-layer * @sgl_ptr: SGL to be filled in * @cmd: cmd we are working on - * @sge_count sge count + * @sge_count: sge count * */ static void @@ -2343,9 +2348,12 @@ int megasas_make_sgl(struct megasas_instance *instance, struct scsi_cmnd *scp, /** * megasas_set_pd_lba - Sets PD LBA - * @cdb: CDB + * @io_request: IO request * @cdb_len: cdb length - * @start_blk: Start block of IO + * @io_info: IO information + * @scp: SCSI command + * @local_map_ptr: Raid map + * @ref_tag: Primary reference tag * * Used to set the PD LBA in CDB for FP IOs */ @@ -2603,10 +2611,12 @@ static void megasas_stream_detect(struct megasas_instance *instance, * affinity (cpu of the controller) and raid_flags in the raid context * based on IO type. * + * @fusion: Fusion context * @praid_context: IO RAID context * @raid: LD raid map * @fp_possible: Is fast path possible? * @is_read: Is read IO? + * @scsi_buff_len: SCSI command buffer length * */ static void @@ -2940,7 +2950,7 @@ megasas_build_ldio_fusion(struct megasas_instance *instance, /** * megasas_build_ld_nonrw_fusion - prepares non rw ios for virtual disk * @instance: Adapter soft state - * @scp: SCSI command + * @scmd: SCSI command * @cmd: Command to be prepared * * Prepares the io_request frame for non-rw io cmds for vd. @@ -3028,7 +3038,7 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance, /** * megasas_build_syspd_fusion - prepares rw/non-rw ios for syspd * @instance: Adapter soft state - * @scp: SCSI command + * @scmd: SCSI command * @cmd: Command to be prepared * @fp_possible: parameter to detect fast path or firmware path io. * @@ -3405,7 +3415,7 @@ megasas_build_and_issue_cmd_fusion(struct megasas_instance *instance, * megasas_complete_r1_command - * completes R1 FP write commands which has valid peer smid * @instance: Adapter soft state - * @cmd_fusion: MPT command frame + * @cmd: MPT command frame * */ static inline void @@ -3459,6 +3469,9 @@ megasas_complete_r1_command(struct megasas_instance *instance, /** * complete_cmd_fusion - Completes command * @instance: Adapter soft state + * @MSIxIndex: MSI number + * @irq_context: IRQ context + * * Completes all commands that is in reply descriptor queue */ static int @@ -3634,6 +3647,7 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex, /** * megasas_enable_irq_poll() - enable irqpoll + * @instance: Adapter soft state */ static void megasas_enable_irq_poll(struct megasas_instance *instance) { @@ -3650,7 +3664,7 @@ static void megasas_enable_irq_poll(struct megasas_instance *instance) /** * megasas_sync_irqs - Synchronizes all IRQs owned by adapter - * @instance: Adapter soft state + * @instance_addr: Adapter soft state address */ static void megasas_sync_irqs(unsigned long instance_addr) { @@ -3706,7 +3720,7 @@ int megasas_irqpoll(struct irq_poll *irqpoll, int budget) /** * megasas_complete_cmd_dpc_fusion - Completes command - * @instance: Adapter soft state + * @instance_addr: Adapter soft state address * * Tasklet to complete cmds */ @@ -3729,6 +3743,8 @@ megasas_complete_cmd_dpc_fusion(unsigned long instance_addr) /** * megasas_isr_fusion - isr entry point + * @irq: IRQ number + * @devp: IRQ context */ static irqreturn_t megasas_isr_fusion(int irq, void *devp) { @@ -3763,7 +3779,7 @@ static irqreturn_t megasas_isr_fusion(int irq, void *devp) /** * build_mpt_mfi_pass_thru - builds a cmd fo MFI Pass thru * @instance: Adapter soft state - * mfi_cmd: megasas_cmd pointer + * @mfi_cmd: megasas_cmd pointer * */ static void @@ -3880,7 +3896,7 @@ megasas_release_fusion(struct megasas_instance *instance) /** * megasas_read_fw_status_reg_fusion - returns the current FW status value - * @regs: MFI register set + * @instance: Adapter soft state */ static u32 megasas_read_fw_status_reg_fusion(struct megasas_instance *instance) @@ -3891,7 +3907,7 @@ megasas_read_fw_status_reg_fusion(struct megasas_instance *instance) /** * megasas_alloc_host_crash_buffer - Host buffers for Crash dump collection from Firmware * @instance: Controller's soft instance - * return: Number of allocated host crash buffers + * @return: Number of allocated host crash buffers */ static void megasas_alloc_host_crash_buffer(struct megasas_instance *instance) @@ -3929,6 +3945,7 @@ megasas_free_host_crash_buffer(struct megasas_instance *instance) /** * megasas_adp_reset_fusion - For controller reset + * @instance: Controller's soft instance * @regs: MFI register set */ static int @@ -4006,6 +4023,7 @@ megasas_adp_reset_fusion(struct megasas_instance *instance, /** * megasas_check_reset_fusion - For controller reset check + * @instance: Controller's soft instance * @regs: MFI register set */ static int @@ -4335,8 +4353,8 @@ static int megasas_track_scsiio(struct megasas_instance *instance, /** * megasas_tm_response_code - translation of device response code - * @ioc: per adapter object - * @mpi_reply: MPI reply returned by firmware + * @instance: Controller's soft instance + * @mpi_reply: MPI reply returned by firmware * * Return nothing. */ @@ -4391,9 +4409,9 @@ megasas_tm_response_code(struct megasas_instance *instance, * @device_handle: device handle * @channel: the channel assigned by the OS * @id: the id assigned by the OS - * @type: MPI2_SCSITASKMGMT_TASKTYPE__XXX (defined in megaraid_sas_fusion.c) * @smid_task: smid assigned to the task - * @m_type: TM_MUTEX_ON or TM_MUTEX_OFF + * @type: MPI2_SCSITASKMGMT_TASKTYPE__XXX (defined in megaraid_sas_fusion.c) + * @mr_device_priv_data: private data * Context: user * * MegaRaid use MPT interface for Task Magement request. From patchwork Mon Jul 6 12:33:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11645597 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C47E739 for ; Mon, 6 Jul 2020 12:33:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3338120722 for ; Mon, 6 Jul 2020 12:33:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="l5zpMKNF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729081AbgGFMdu (ORCPT ); Mon, 6 Jul 2020 08:33:50 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37661 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728917AbgGFMds (ORCPT ); Mon, 6 Jul 2020 08:33:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594038828; x=1625574828; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=TK1kohfiyJx5lgy+zcMRHkGDBhsN/JpSMDtWmtP20ag=; b=l5zpMKNFjxjOYpahkhjXXJz2xED+JmK6PA5L0zMDn4njyH77x6BgOeTf I9ESDb393pmpk1ho2aOX5gEgURofQuP/GEzIWtuWRtXxcCjnxFaflHcmp dctkUIX/UsGhcyBNRXdwL7GSaSBatmofNRTtDVx830Ts35cV2tqIThNpW n/aECgjXf1XDwCKf9carlraTIOyXtQLwq1aOAib8eBEl8UMwDBpoE+87f hHvFlSs1+cRgY5RSwc3i3B8xP+bO1Y3hZ2QwUMv++0G7ClT/WocGGjfeD GMQoabo2dM6yrj1a2SZ/qfbuNeUzh5H7edWgYJIrL8N8w3wreR5ipMEV5 g==; IronPort-SDR: wQ4O/AKtBWunDeVrmHL1FEc20+CZKwIoTWSPuEXcCTprqC94DiTbyRnOlVIPU5ilu9xamDZnDi PYodppcr8zOjM4snLE9cPMCzMYyBdYMH/Eu0i0RKrtq/UTiVa+709X0COE6S9JAOAhpf9Bjya7 XKuotnU4ooaYsx5DJenVVE7zg7HokkIzV0kdyuhAaWrq8kMqgYETQjQanQnS+5F9GatIhhl3Lw cop2yP3HKygfr4TwO0nd4EH67TTeBCK9yPudPz4zrtUNN/piKyQzD3quPbNGgcoFJZYoUKdNaW LNE= X-IronPort-AV: E=Sophos;i="5.75,318,1589212800"; d="scan'208";a="146052058" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Jul 2020 20:33:48 +0800 IronPort-SDR: ymQ1dd5njpHnP6/qfc4r6nIVZBSqhMcC//IzZ7vWUqh3n/76J/QBsG395tQkgMSQoZ4rcBFnXV KHxeQ+5GS+r0OJG5GBDmZ33N23iMTxvOE= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 05:21:56 -0700 IronPort-SDR: +VywGPojNOe7CnPu6JMH7RMUGiHXobg6Q3TbqELUxsxNMazX7b7adoCND7mF8XLASdXPBqyxvE vShOkxWaTWEA== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2020 05:33:47 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" Subject: [PATCH 02/10] scsi: megaraid: Fix compilation warnings Date: Mon, 6 Jul 2020 21:33:46 +0900 Message-Id: <20200706123346.451827-1-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Move functions declarations to megaraid_sas.h to avoid warnings such as warning: no previous prototype for ‘xxx' No functional changes. Signed-off-by: Damien Le Moal --- drivers/scsi/megaraid/megaraid_sas.h | 20 ++++++++++++++++++++ drivers/scsi/megaraid/megaraid_sas_base.c | 4 ---- drivers/scsi/megaraid/megaraid_sas_fusion.c | 15 --------------- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index af2c7a2a9565..5e4137f10e0e 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h @@ -2709,4 +2709,24 @@ int megasas_adp_reset_wait_for_ready(struct megasas_instance *instance, int ocr_context); int megasas_irqpoll(struct irq_poll *irqpoll, int budget); void megasas_dump_fusion_io(struct scsi_cmnd *scmd); +u32 megasas_readl(struct megasas_instance *instance, + const volatile void __iomem *addr); +struct megasas_cmd *megasas_get_cmd(struct megasas_instance *instance); +void megasas_return_cmd(struct megasas_instance *instance, + struct megasas_cmd *cmd); +int megasas_issue_polled(struct megasas_instance *instance, + struct megasas_cmd *cmd); +void megaraid_sas_kill_hba(struct megasas_instance *instance); +void megasas_check_and_restore_queue_depth(struct megasas_instance *instance); +void megasas_start_timer(struct megasas_instance *instance); +int megasas_sriov_start_heartbeat(struct megasas_instance *instance, + int initial); +int megasas_alloc_cmds(struct megasas_instance *instance); +void megasas_free_cmds(struct megasas_instance *instance); + +void megasas_init_debugfs(void); +void megasas_exit_debugfs(void); +void megasas_setup_debugfs(struct megasas_instance *instance); +void megasas_destroy_debugfs(struct megasas_instance *instance); + #endif /*LSI_MEGARAID_SAS_H */ diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 2fda0dca122a..8038467e446d 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -202,10 +202,6 @@ static bool support_pci_lane_margining; static spinlock_t poll_aen_lock; extern struct dentry *megasas_debugfs_root; -extern void megasas_init_debugfs(void); -extern void megasas_exit_debugfs(void); -extern void megasas_setup_debugfs(struct megasas_instance *instance); -extern void megasas_destroy_debugfs(struct megasas_instance *instance); void megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index c4f15a52f86b..bb3427898177 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -48,9 +48,6 @@ #include "megaraid_sas.h" -extern void megasas_free_cmds(struct megasas_instance *instance); -extern struct megasas_cmd *megasas_get_cmd(struct megasas_instance - *instance); extern void megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, u8 alt_status); @@ -58,24 +55,14 @@ int wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd, int seconds); -void -megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd); -int megasas_alloc_cmds(struct megasas_instance *instance); int megasas_clear_intr_fusion(struct megasas_instance *instance); -int -megasas_issue_polled(struct megasas_instance *instance, - struct megasas_cmd *cmd); -void -megasas_check_and_restore_queue_depth(struct megasas_instance *instance); int megasas_transition_to_ready(struct megasas_instance *instance, int ocr); -void megaraid_sas_kill_hba(struct megasas_instance *instance); extern u32 megasas_dbg_lvl; int megasas_sriov_start_heartbeat(struct megasas_instance *instance, int initial); -void megasas_start_timer(struct megasas_instance *instance); extern struct megasas_mgmt_info megasas_mgmt_info; extern unsigned int resetwaittime; extern unsigned int dual_qdepth_disable; @@ -84,8 +71,6 @@ static void megasas_free_reply_fusion(struct megasas_instance *instance); static inline void megasas_configure_queue_sizes(struct megasas_instance *instance); static void megasas_fusion_crash_dump(struct megasas_instance *instance); -extern u32 megasas_readl(struct megasas_instance *instance, - const volatile void __iomem *addr); /** * megasas_adp_reset_wait_for_ready - initiate chip reset and wait for From patchwork Mon Jul 6 12:33:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11645599 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C251992A for ; Mon, 6 Jul 2020 12:33:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AAA4120771 for ; Mon, 6 Jul 2020 12:33:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="NA5hRhFM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729094AbgGFMdu (ORCPT ); Mon, 6 Jul 2020 08:33:50 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37662 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbgGFMdt (ORCPT ); Mon, 6 Jul 2020 08:33:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594038830; x=1625574830; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=XL5DCWDWIQygV5i3Im5vcWH3rrQNLaW35XdZbeJI/5o=; b=NA5hRhFMa7yWoVK+VTOciA6YJ9ywoN9rU4D2wEKEn5FDzbYOawCncoX3 5/0MEzGwhVK38tM6QUy6RwlDI2+NYtJxUdzw7EebIp6Rb+WKKuBLbVDDa +sYpxhUPuXssK4Nyr9CUuQRjncKy68PrEnToeyvUe8Hw8qEDA4sTSFghy 0so4cOGuCd4a745D+ybxPZ+lVBDy9clcmyPQH/rk878wyE2r8XvwuCajd /4coqVRBopYostFT/qkeAJnXv6oJDwqPZcnom1z7T3lgoL74vEUJKCakG bC8FNmT40SMKBpv8hhD2kzvTtFxTwEHY4w4LN/4VTi5xEMFYQKo0XRQrF A==; IronPort-SDR: w+7XKfO3QtbdoDY0S/hpp9HL+Cm6/iGU7ZfiKHZu9oVLEcYYAEGUIDn1JV9ELZwbEgBLiWw/wz HEgHSvhDBp9fxcYYg/KdXZ/7qUkXLwKxK8XqwUuFpT9BVPr6TmmlK50jkttO4BVYV/OtohGnps 4o5CfEhfusFVJgKPY0zCXnhtbPgeOgfyeU13X/vvdfJ9X5aUBX6lDGGFvcu7QXYT3w4QbUrWPl LoLS0hGWzQk55vaARYlG63cktWRVwA9LNvRLTiaoaw7718rkcbiFHbyMLayFzETGvyA0CKggBg ZHY= X-IronPort-AV: E=Sophos;i="5.75,318,1589212800"; d="scan'208";a="146052059" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Jul 2020 20:33:50 +0800 IronPort-SDR: GztNl5FB/A9Gwz5Zz2r890WXDYT9cOWabTaQSeJ2iMzQybIvlqzT1xkbR4hnFJ2PrNli5hCyR3 oNCb3oYptUvceW8CaUrDv9vjMgERJFDfI= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 05:21:58 -0700 IronPort-SDR: CrCFkiZz2u0LCosFuCsSqkwFw0HQo78EDagJkppuBHfzGM+L2HXnEOrsH5zdeOWdAjvWYBIoFO edrAeicGfrWg== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2020 05:33:49 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" Subject: [PATCH 03/10] scsi: megaraid: Remove set but unused variable Date: Mon, 6 Jul 2020 21:33:48 +0900 Message-Id: <20200706123348.451871-1-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The variable remainder is unused in mega_div64_32(). Remove it to avoid a compiler warning. While at it, also fix the function documentation comments. Signed-off-by: Damien Le Moal --- drivers/scsi/megaraid/megaraid_sas_fp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c index 3b3d04d7671f..b6c08d620033 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fp.c +++ b/drivers/scsi/megaraid/megaraid_sas_fp.c @@ -80,21 +80,20 @@ u32 mega_mod64(u64 dividend, u32 divisor) } /** - * @param dividend : Dividend - * @param divisor : Divisor + * mega_div64_32 - Do a 64-bit division + * @dividend: Dividend + * @divisor: Divisor * * @return quotient **/ static u64 mega_div64_32(uint64_t dividend, uint32_t divisor) { - u32 remainder; - u64 d; + u64 d = dividend; if (!divisor) printk(KERN_ERR "megasas : DIVISOR is zero in mod fn\n"); - d = dividend; - remainder = do_div(d, divisor); + do_div(d, divisor); return d; } From patchwork Mon Jul 6 12:33:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11645601 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 011F192A for ; Mon, 6 Jul 2020 12:33:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D2E0C20771 for ; Mon, 6 Jul 2020 12:33:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="D7GyKAKx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729125AbgGFMdv (ORCPT ); Mon, 6 Jul 2020 08:33:51 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37664 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbgGFMdv (ORCPT ); Mon, 6 Jul 2020 08:33:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594038831; x=1625574831; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=WNLX/+Oz5Vex8A8CocMW9LO62aSK0QWDznL8cr1hlJc=; b=D7GyKAKxzD9iypuxug4FttdCUbY1yzejYm3o+wToAExYQjVvYlz0/ybE ZSl2HmEvHlXdIZLW41B84rzaL943MqSZJtwMXtFTtPCojfctZ4BzSk0Ty gPgEOiAdvUiNm/NN+rUodbY8yQ696dWSqdfC3ZU49lbnogSCGI66R7FXp oZVjjzgclCjWFo1pt3S20720D9MdA+7mDx96Ox1r1Kmjy3pbIpsJuond5 +4PEcX3EkY/aZbZhja0YsYuIBGydjtKi6AQzOP3SfT+WS9DIbVite8Uhq uhgHGJODGurT6J7LaTaKLGcouzSDtjQRT7MMszrq735aoTezwg+uMC334 w==; IronPort-SDR: ahhg4Hqgzze2sRgeLyrKUrMVQooAMpmAM75JBhaKpEuCoprJDU3apyrhWLjuQbYsXnRFt4Dcr6 JVCBNEBNnLuFqBjQXCdmOfUykHwCUUGMk0yJRnMDDEtlOw0ZS1w9hty/su85lj7Ts0r380XrEr s2L/mr857Qh3fU1zNI6zibpPMDOJYjH78BFm+IbcCUYwS73jn0LJ6kTIokA5T7JuBzTGcfJ4db PS8Cll+11oVIAaa46y2pnU8Sgqlah4aXPjKAH3UBHxKeQTk7ARZWFcvh9u4PhGD38ufQHBxV0s UpA= X-IronPort-AV: E=Sophos;i="5.75,318,1589212800"; d="scan'208";a="146052063" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Jul 2020 20:33:51 +0800 IronPort-SDR: TiSuk9vbvg314nyRsh08VIcz6lEbVQsQrQgFS8Xh7q0ZnwApMNgBArzbvkh8n+i+lAJM3eM0Ns nHaHVBmjDQn+vgHn3nR+5FeAclR41/lWw= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 05:21:59 -0700 IronPort-SDR: pUWuducwwkMp3sIIWMs+hUV8Blk3bgBGhwbcrd6MWpAzWY1ulmA63zGOwf4SfTkVir3qn7kdBM 06l7bTxKkwnw== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2020 05:33:50 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" Subject: [PATCH 04/10] scsi: megaraid: Remove set but unused variable Date: Mon, 6 Jul 2020 21:33:49 +0900 Message-Id: <20200706123349.451915-1-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In mega_build_cmd(), the variable epthru is set but not used. Remove it to avoid a compiler warning. Signed-off-by: Damien Le Moal --- drivers/scsi/megaraid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 07ce31c546ba..96ecf5929e68 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -517,7 +517,6 @@ mega_get_ldrv_num(adapter_t *adapter, struct scsi_cmnd *cmd, int channel) static scb_t * mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy) { - mega_ext_passthru *epthru; mega_passthru *pthru; scb_t *scb; mbox_t *mbox; @@ -905,7 +904,7 @@ mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy) if( adapter->support_ext_cdb ) { - epthru = mega_prepare_extpassthru(adapter, scb, cmd, + mega_prepare_extpassthru(adapter, scb, cmd, channel, target); mbox->m_out.cmd = MEGA_MBOXCMD_EXTPTHRU; From patchwork Mon Jul 6 12:33:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11645603 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 50D4892A for ; Mon, 6 Jul 2020 12:33:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 38B1420715 for ; Mon, 6 Jul 2020 12:33:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="ZKl2SN6P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729127AbgGFMdx (ORCPT ); Mon, 6 Jul 2020 08:33:53 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37664 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbgGFMdw (ORCPT ); Mon, 6 Jul 2020 08:33:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594038833; x=1625574833; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=+L/27iWpKb2Q84j8Ql9wxiyhEN2izLsIXNk4XFny46c=; b=ZKl2SN6PKGGQUmmZN1BuuJgAvcYxnKYnEqR4hWvEj65qMKPhDFe+7txn 4sGNsT9vuNFBOY+Vra4Y/5q5h35cRVy53Z52QvxspGfI3FZaFmC2cChF9 U6TEStfjOvASp7OIqLdUO1A4kSvL4meHYttBTHhAQZR1xBvG4n0ss6Oqy UrM+Q4Xy0BBVr6f4AxIeDWRhsuvzxDVEsPhH0OpJYANbGCO6GpwLv5Avy +DQ0DJYOqGG9jyoLXMKBnd5CdZD5QFJ9ol2FLyHUtTlsfSxQyHC5TDBpc mVDyIcLHZf80tBDi7rov7nW+6EEsnmD47vfQnKW24X+n8x//uzL5CPw6O Q==; IronPort-SDR: 0F7MrwA+ZGOhuaH+9zoPXcFvn56/VqOFx8o0vLmHlbXh/aqQGqsIKth5h/tYf9xgvsAwgb8a/a YU9GQ//tCtc7Ma18myigOp7ZrtmA8DPgm+RmCe6PA18KDWIpQyiK9bRk8ADAsNwWW4+dDWQQ/o MVk2Lt0lWoatm4lmw8o8iZ61dI4nugbCRbcER4Zvri9HBSN8waIRLbGpNmg8uhsXsSHz2zQcMb JsaAdZfnPcIj9RLWUYZdTU5HwqF7DiCaDKOHLK5vngEd0fZhKtcwyJ4j11qBo3J6B+63S/qsx0 rpM= X-IronPort-AV: E=Sophos;i="5.75,318,1589212800"; d="scan'208";a="146052065" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Jul 2020 20:33:52 +0800 IronPort-SDR: u1HHsFpegJRMpxSCIUqEX9K9a74HBMnK0zZcKY3edtNSl/TE9Rl7GIf5ivo8XCzRUuKHQ1RpVV 37XRC1uqEXrRC6rv4l7gLnzy3Eag4MJ6A= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 05:22:00 -0700 IronPort-SDR: hrAsDyacn8EBN+V7EbiJEVEpo4gLI1ZPN5WYqGvkcRCz7qwciWs0DM24eTV2Tf9e/QzcRg/8zS MHMPTrrigKqQ== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2020 05:33:52 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" Subject: [PATCH 05/10] scsi: megaraid: Fix set but unused variable Date: Mon, 6 Jul 2020 21:33:51 +0900 Message-Id: <20200706123351.451959-1-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In megadev_ioctl(), if MEGA_HAVE_STATS is not defined, the variables num_ldrv and ustats are unused. Conditionally define them to avoid compiler warnings. Signed-off-by: Damien Le Moal --- drivers/scsi/megaraid.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 96ecf5929e68..acd7c6ed77b1 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -2975,14 +2975,13 @@ megadev_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) void *data = NULL; /* data to be transferred */ dma_addr_t data_dma_hndl; /* dma handle for data xfer area */ megacmd_t mc; - megastat_t __user *ustats; - int num_ldrv; +#if MEGA_HAVE_STATS + megastat_t __user *ustats = NULL; + int num_ldrv = 0; +#endif u32 uxferaddr = 0; struct pci_dev *pdev; - ustats = NULL; /* avoid compilation warnings */ - num_ldrv = 0; - /* * Make sure only USCSICMD are issued through this interface. * MIMD application would still fire different command. From patchwork Mon Jul 6 12:33:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11645605 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6B31739 for ; Mon, 6 Jul 2020 12:33:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B331A20771 for ; Mon, 6 Jul 2020 12:33:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="mpz8vB3R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729131AbgGFMdy (ORCPT ); Mon, 6 Jul 2020 08:33:54 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37664 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbgGFMdy (ORCPT ); Mon, 6 Jul 2020 08:33:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594038834; x=1625574834; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=gnPXzBFWtlmUJUaYSaiOxtdE3FpOzp8I0AYuL/PA/Z0=; b=mpz8vB3R5aSSXPe4PuPR9KmfnWoiavZvtMufBMzEuuBKvyJhieNtICoN 3BpKE0upm77JvhoOJRG1G9U88jdWVtirYXKxixur9CZ4c0KF2ImLbCwoW KTdOuP4xcuHad7zVUlBFb9o9/12kO9kpNavD154sKE0fx8zhtcbYa9Jkv zjOU0avQm+8ip2gY7L0juvpSLre/EnR9v/6pkZqVJm+GVrY/DB3eH/khz FWbACxsGU492GV8Qq4a87e3xRjEytp7PulL4vOqMPRAxXfE3X/VDBJFVM 5gL5WB0PaydL/fQG+ENGz3IA+5TEO+VccRurc4d+NLK0ebe8feAWXuop6 Q==; IronPort-SDR: eakyinCsle7rNqcybtfTew7Lxsn4pQRI/2n4CdHm8Dl3mL0Z9GfoP67WO2Ny7oHQ8EGn+Rqrjg C3J1mcAwzcxF+JyvmlsTj8MDlhqTf7QA9qPIRMPlzu/lNPMBgmSBdNlRpWT7h+nfS7ZN1OAQDh TFuV5Zl8ldc3496dwTxO0lpKjGE4r6q4A95ceUDy2K7ckqNkgTY4onioh+AHA/49lL6B6FAugm BVGjEK7vxXU/M0oeQr01aB4xVKMLKIQCOlbyCEwK/iknsgXEgRVVfwVQy66ZG4qrnrb5zTiMZt aGQ= X-IronPort-AV: E=Sophos;i="5.75,318,1589212800"; d="scan'208";a="146052066" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Jul 2020 20:33:54 +0800 IronPort-SDR: EhXZzuk+MIe3jkT1WJwIK+Y+nF+CmGYZWZGzSMcMYJLPU31pdqMPOlSEDLniqIEjVnj73l50Br Som+SOiKA8L5tiOrbVwMLfnkrBpy6bPmg= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 05:22:02 -0700 IronPort-SDR: 8PPRyk9J6oqi+00HDsnqBmRRYO72wB2It9X0NqaonLBSs+OqQTsRhqWL8xQg2GpyY7B5xNrRwk 8X5Arw1r5Obg== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2020 05:33:53 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" Subject: [PATCH 06/10] scsi: megaraid: Remove set but unused variable Date: Mon, 6 Jul 2020 21:33:52 +0900 Message-Id: <20200706123352.452003-1-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In mega_is_bios_enabled(), the variable ret is set but unused. Remove it to avoid a compiler warning. Signed-off-by: Damien Le Moal --- drivers/scsi/megaraid.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index acd7c6ed77b1..0484ee52ae80 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -3571,7 +3571,6 @@ mega_is_bios_enabled(adapter_t *adapter) { unsigned char raw_mbox[sizeof(struct mbox_out)]; mbox_t *mbox; - int ret; mbox = (mbox_t *)raw_mbox; @@ -3584,8 +3583,7 @@ mega_is_bios_enabled(adapter_t *adapter) raw_mbox[0] = IS_BIOS_ENABLED; raw_mbox[2] = GET_BIOS; - - ret = issue_scb_block(adapter, raw_mbox); + issue_scb_block(adapter, raw_mbox); return *(char *)adapter->mega_buffer; } From patchwork Mon Jul 6 12:33:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11645607 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 496CE739 for ; Mon, 6 Jul 2020 12:33:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28FE020771 for ; Mon, 6 Jul 2020 12:33:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="RdyYGunS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729135AbgGFMd4 (ORCPT ); Mon, 6 Jul 2020 08:33:56 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37664 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbgGFMdz (ORCPT ); Mon, 6 Jul 2020 08:33:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594038836; x=1625574836; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=GQ9s9/XmUBkm/zbNHvG0/bSQ+s0KIIp/p3VpmxY3az4=; b=RdyYGunS23dOxYoNz8SDLKS8eSwZlem/NXh+c3WAc5klKOKhA3Or/t5H 1PdApMqdU1d/3n5dNODrnjP0Jp+LpD8uXV43UwlIVtOxVwMBrjpVSy5LI RrfeIzqkLRA2XwAsKh4+4kzx+Ltos+U+7unlREA1Lj8/IYLCdO7mILH13 uWzAiJ+o+8ofh95fKnDyYMgkp2U4T4msYRx672PHpchUoDOQr/T2mtxXm Lacik33PbCgb/e/4NASLGjiDCOioawtD1vfi3pNA5vkUccPKv1fLufXds 7rDls4n4jyi83Lg7NpXVQJcfvQaRMkZSpLY18r97AygtgGJRFibcdSHyf g==; IronPort-SDR: nsMLFWmFOdmemWJYqyADiJ0WJ5Oari9Ga2yYrk5FUveNtRqntWHg4HoHhWad9hGWrg4A3RkeXt X7J2OukWcOo7LVyCYruobi5P344aryU9oWnj4UAdak22HDRhA4IxR0fpxxP/5qJq6XUFwm4v8L r5wXn70z7+YLwfgvugTEvrAIdGHuzNSKNzfD/s5/7CsJxOmluVKgLYFk/LyjTJmt4mGcJIuOYH ktQqwEuEt/+vRzErbsPMCIBq35duMUdwCA+OmvxFZ6NSfx2cl9e/HYbbQGM0T5W7pjCyF0V9kv Trg= X-IronPort-AV: E=Sophos;i="5.75,318,1589212800"; d="scan'208";a="146052069" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Jul 2020 20:33:55 +0800 IronPort-SDR: SMBgrglB4ADnRA/YmHKDL9EQTUpeug3pt5XRz6yGCSAYVPR5tjm3uEzbyj7WBQAiVdVGJHdoUA PpnR3f1Lx9IcmkTtqARAAPJfMJksiXyxc= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 05:22:03 -0700 IronPort-SDR: 78w3JdqbSr7WpBRyX7531ESKSC4PMwUfJJR+LRzrwvqAtbAF4jIiH6l90HQGe9587Sl66A1rmP 8Qvd37jQ+GDw== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2020 05:33:55 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" Subject: [PATCH 07/10] scsi: sd: Fix kdoc comment format Date: Mon, 6 Jul 2020 21:33:54 +0900 Message-Id: <20200706123354.452047-1-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the kdoc comment of the function sd_ioctl_common() to avoid a compiler warning when compiling with W=1. No functional changes. Signed-off-by: Damien Le Moal --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index d90fefffe31b..acde0ca35769 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1479,7 +1479,7 @@ static int sd_getgeo(struct block_device *bdev, struct hd_geometry *geo) * @bdev: target block device * @mode: FMODE_* mask * @cmd: ioctl command number - * @arg: this is third argument given to ioctl(2) system call. + * @p: this is third argument given to ioctl(2) system call. * Often contains a pointer. * * Returns 0 if successful (some ioctls return positive numbers on From patchwork Mon Jul 6 12:33:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11645609 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0D8C92A for ; Mon, 6 Jul 2020 12:33:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F95B20771 for ; Mon, 6 Jul 2020 12:33:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="mgOtUg0y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729139AbgGFMd5 (ORCPT ); Mon, 6 Jul 2020 08:33:57 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37664 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbgGFMd5 (ORCPT ); Mon, 6 Jul 2020 08:33:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594038837; x=1625574837; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=pdI+PBufFwWN4+0vClGCaZYvdgoc02DLa9/tmsmRTJM=; b=mgOtUg0ygIvvLCKJbzA1kwd+tCcaACodMbz+5pdrSEDNw9FlEPA+eWB0 KDpgbFLj0rbDUIRWCV/1isL9+/MqJsrTz4QpaAvVkLW6n4F8kD5IZ+f09 BPqxSKInrW/MA+p3UfYZPS542aEmMruSiVnNvN/l0oB2UeUnKj39W1uCe jzraNYuYdxlxHk8/UDZ/1nkqVwP0dsfEaG+zi3dz7bR8v8Ojv73W7ZU3j g+6Fn/cw28GdZjl4p419SgJH8TNXpDDj492GEyc6mKbrCqi2UzOa4OH5d Jy5X5B/CZohWOOfmu1AqZGAgwNRmi+AMolRpmO4MxQrqqTaywQ50wETpv w==; IronPort-SDR: Z11JeA+/abaQCjgq6Lj0GNxTAxoqK9KC8IwQCwofutVoiSQl3QOT1oTHhEc+nVHNB1TNtaH5ub DeKRQaFkJxZ86pIUT13+hj42XlVcYMMtqbxJC8RP20F124L/ed+gMRQk7pQk89ox7729A9OWsD mFvRVgl5c20uvC3H4OZ5XyyzegDI3ihfFlErv0ws/KpOOC4oC2YVsmHyMVlpG2/BUHKkELqKkd qhqTrQDl2iH6eNOIqgm/vAIBoXQ69ZEZ+lF3LWWLRiOdKiUUrOLP/XPiHF1dl8iDpjecVv4PPS GlI= X-IronPort-AV: E=Sophos;i="5.75,318,1589212800"; d="scan'208";a="146052071" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Jul 2020 20:33:57 +0800 IronPort-SDR: RVS2DlLadUH1AtG/Lvo1b9MKyxo4pqiHQxT4AGOE66paQBaaDRQhUR0XsqONQq794B0e8JWbPC Srrgk0ljBsdkDM0aiLr8dVWn6e8FHhMF0= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 05:22:05 -0700 IronPort-SDR: A7PZbcWmdaj0PRV0WmJeDzy3CnQ7Mlhb4SJnRC3SciXAk6YnPksp/eYFG4PzWJz09rthDuMQ1C 5+gGRURm/9rw== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2020 05:33:56 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" Subject: [PATCH 08/10] scsi: sd_zbc: Fix kdoc comment format Date: Mon, 6 Jul 2020 21:33:55 +0900 Message-Id: <20200706123355.452091-1-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the kdoc comment of the function sd_zbc_check_capacity() to avoid a compiler warning when compiling with W=1. No functional changes. Signed-off-by: Damien Le Moal --- drivers/scsi/sd_zbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c index 6f7eba66687e..c43755b52b86 100644 --- a/drivers/scsi/sd_zbc.c +++ b/drivers/scsi/sd_zbc.c @@ -584,7 +584,7 @@ static int sd_zbc_check_zoned_characteristics(struct scsi_disk *sdkp, * sd_zbc_check_capacity - Check the device capacity * @sdkp: Target disk * @buf: command buffer - * @zblock: zone size in number of blocks + * @zblocks: zone size in number of blocks * * Get the device zone size and check that the device capacity as reported * by READ CAPACITY matches the max_lba value (plus one) of the report zones From patchwork Mon Jul 6 12:33:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11645611 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 134D2739 for ; Mon, 6 Jul 2020 12:33:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF50E20722 for ; Mon, 6 Jul 2020 12:33:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="XgklHxdc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729143AbgGFMd6 (ORCPT ); Mon, 6 Jul 2020 08:33:58 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37664 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbgGFMd6 (ORCPT ); Mon, 6 Jul 2020 08:33:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594038838; x=1625574838; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=CPJcnLv0o7wPruH5hfsyoM7R2TiIe8k5zJELLtCoIcs=; b=XgklHxdceUhVusNzxYJVB1nMKF1RZ5VkKQ9e/f5dLexe2ZssDNzlvoTW reaIPH7IwQ63lF9zHXDfvLmtBxf8yFgT3CvSoJOS34qja71H4OGq+6PhN JLxv7DF1RfBQMsdX9ksd1o1duWB4T0x7uAFCLkDudgR0KeI/5c4pZPhYf OtD2vcpyGMIoauEcOgDJ3MmKEtrhde831pCLUFNcbaf5SmqoKNtRcLYhy wWMCLx9LSo0q6m2DzpF1mYYQBS6hXmEorSX3yA7EYzBlMCGSiSwMb+uou v3ahTrUaWJ48BvZ4rgPYM2kSQ/isyG5nmBTpGdI6nSkKZ6kk7DbDCvuEv Q==; IronPort-SDR: x4kTPjChay5wb7ll1veb33sqGmHHB1r1bXYR/g9xOPNDdeN7j5fj1ndalM9sGPYgV15QAcPg6g TTDBU+/M74FxN0SCea4Ym+MAJzT4F2AbXJbT4YV+LwlYc/DqoLLDC7jtBdU7D07t2zPq6/Ig8B JE+NGplsEvcsPDd8hwkIYQQgQTSW5pwq06YYbk9A5vL6bhpJ2daABhb/rBKoxqmg7OfOXnpbNT RB0R0N2ckuur/4EcFj/mDT10pNPRlMJVPCsds5TRbeslYancbgqFURvzThOZumzxuuhxWU2YRj uxk= X-IronPort-AV: E=Sophos;i="5.75,318,1589212800"; d="scan'208";a="146052074" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Jul 2020 20:33:58 +0800 IronPort-SDR: QlLWnhaSoqwknU1kpsrY2plmCLl46BRkpjEP2wWEYrl0JTFS0TBlLwS9ubdEjW052iF/2aP7k+ v2NId4eOOVcT/vXbIRvHRnFj2I8462izA= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 05:22:06 -0700 IronPort-SDR: 1jLMdNhVqvn2drUkHKODpRcnlKyMC+Ol988daExTDV/3hU75a+42c45BZEhe0FP4pmackhIElv BibEL5Wyn9ug== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2020 05:33:57 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" Subject: [PATCH 09/10] scsi: mpt3sas: Fix set but unused variable Date: Mon, 6 Jul 2020 21:33:56 +0900 Message-Id: <20200706123356.452135-1-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In _config_request(), the variable issue_reset is set using the macro mpt3sas_check_cmd_timeout() but otherwise unused, causing a compiler warning when compiling with W=1. Avoid this warning by removing this variable, using the function mpt3sas_base_check_cmd_timeout() directly instead of the mpt3sas_check_cmd_timeout() macro. Signed-off-by: Damien Le Moal --- drivers/scsi/mpt3sas/mpt3sas_config.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c b/drivers/scsi/mpt3sas/mpt3sas_config.c index 62ddf53ab3ae..11026e0ef3d0 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_config.c +++ b/drivers/scsi/mpt3sas/mpt3sas_config.c @@ -303,7 +303,6 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t u8 retry_count, issue_host_reset = 0; struct config_request mem; u32 ioc_status = UINT_MAX; - u8 issue_reset = 0; mutex_lock(&ioc->config_cmds.mutex); if (ioc->config_cmds.status != MPT3_CMD_NOT_USED) { @@ -386,9 +385,9 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t if (!(ioc->logging_level & MPT_DEBUG_CONFIG)) _config_display_some_debug(ioc, smid, "config_request", NULL); - mpt3sas_check_cmd_timeout(ioc, - ioc->config_cmds.status, mpi_request, - sizeof(Mpi2ConfigRequest_t)/4, issue_reset); + ioc_err(ioc, "%s: command timeout\n", __func__); + mpt3sas_base_check_cmd_timeout(ioc, ioc->config_cmds.status, + mpi_request, sizeof(Mpi2ConfigRequest_t) / 4); retry_count++; if (ioc->config_cmds.smid == smid) mpt3sas_base_free_smid(ioc, smid); From patchwork Mon Jul 6 12:33:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11645613 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E8B8739 for ; Mon, 6 Jul 2020 12:34:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 658A320771 for ; Mon, 6 Jul 2020 12:34:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="VMZeTSP5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729146AbgGFMeA (ORCPT ); Mon, 6 Jul 2020 08:34:00 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:37664 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbgGFMd7 (ORCPT ); Mon, 6 Jul 2020 08:33:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594038840; x=1625574840; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=aa6XVNXMIFXJmt1RWjyA8wyymcdyRgBIGqOz1Hq/Xsg=; b=VMZeTSP5jzuJf/bKbPkySA/ttyXzr/Ghw1jxyMuLz8trOd8CDOvZ1lq4 WEiQi0eScOxy8bawxHXDjl0fDzkHAHbcUmc8h/BcBAvGF5QetvM3hGAf4 +oYIspKg6p6AE7b51ir1uDXdFEfXcW6QYEBmrtxwKZ8kF6J30GIF+tYTT HOrpCfe58mr4yAmk6+t8JPbA2Q7eoXhSWgbE+XEiwqMfFMBIVBJlHtJu5 NZgZY7p5411DB3Kinxqk6XIB+E3z+4ztcP190+zayAldXuqCs27nFOQPI 05vwixus9KSJVvLc1QVdXEuPT0nVWDcEr/9CMX/UyNHz1i/EDgOrerNT6 w==; IronPort-SDR: EYr5U4WlHocJynE+L8fon+k/Rd1nLSMt4V1g/dN+qTdtfNF4wpUavkTXpfjOuRIDLU7X10UTMi FkVDpRjb0ZKrHNmrRDwB303uWG1PveHp8crPqegugv60+qM1p7PzpSwa6HeHRde/1samSo+321 1Lw08kxOYscE3/9xzgTtQjr0Kd5Pz3edibDVexoVgGmFiXZebHiHK0vmLYI7YJDLPO4ejBhqV0 tetYuYQ1JJQ+mEyQ7Prhycn7dAIH5yRZNayDZ/F8+MS/uPs/gnEMEurPzINYLS2scJoChGbjrp 7fE= X-IronPort-AV: E=Sophos;i="5.75,318,1589212800"; d="scan'208";a="146052076" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Jul 2020 20:34:00 +0800 IronPort-SDR: +o1vVOGqu8fucQvXjtJDxLS9ZKd6VAxrIZcxIGSZCFrUgut7Q1jVy0im8htHx/OcdcFBzl9XZp gM50KlhuMFVUjB4kwda5/Vxd1lFHRYT+Q= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 05:22:08 -0700 IronPort-SDR: JQwybiIHmZw7MGGJ/UxyxGFDHctSlOq41DopoYcRQz4hNsot8QlIoQ6H4Pk1x4gywJK4cbihzj AcqDhYcCZB3Q== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2020 05:33:59 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" Subject: [PATCH 10/10] scsi: mpt3sas: Fix kdoc comments format Date: Mon, 6 Jul 2020 21:33:58 +0900 Message-Id: <20200706123358.452180-1-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix kdoc comments format to avoid compiler warnings when compiling with W=1. No functional changes. Signed-off-by: Damien Le Moal --- drivers/scsi/mpt3sas/mpt3sas_base.c | 14 ++++++++------ drivers/scsi/mpt3sas/mpt3sas_ctl.c | 16 ++++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 96b78fdc6b8a..1d64524cd863 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -190,7 +190,7 @@ module_param_call(mpt3sas_fwfault_debug, _scsih_set_fwfault_debug, /** * _base_readl_aero - retry readl for max three times. - * @addr - MPT Fusion system interface register address + * @addr: MPT Fusion system interface register address * * Retry the readl() for max three times if it gets zero value * while reading the system interface register. @@ -817,6 +817,7 @@ mpt3sas_base_coredump_info(struct MPT3SAS_ADAPTER *ioc, u16 fault_code) * mpt3sas_base_wait_for_coredump_completion - Wait until coredump * completes or times out * @ioc: per adapter object + * @caller: caller function name * * Returns 0 for success, non-zero for failure. */ @@ -1718,8 +1719,8 @@ _base_interrupt(int irq, void *bus_id) /** * _base_irqpoll - IRQ poll callback handler - * @irqpoll - irq_poll object - * @budget - irq poll weight + * @irqpoll: irq_poll object + * @budget: irq poll weight * * returns number of reply descriptors processed */ @@ -3048,8 +3049,8 @@ _base_assign_reply_queues(struct MPT3SAS_ADAPTER *ioc) /** * _base_check_and_enable_high_iops_queues - enable high iops mode - * @ ioc - per adapter object - * @ hba_msix_vector_count - msix vectors supported by HBA + * @ioc: per adapter object + * @hba_msix_vector_count: msix vectors supported by HBA * * Enable high iops queues only if * - HBA is a SEA/AERO controller and @@ -5621,6 +5622,7 @@ _base_wait_on_iocstate(struct MPT3SAS_ADAPTER *ioc, u32 ioc_state, int timeout) * _base_wait_for_doorbell_int - waiting for controller interrupt(generated by * a write to the doorbell) * @ioc: per adapter object + * @timeout: timeout in seconds * * Return: 0 for success, non-zero for failure. * @@ -5833,7 +5835,7 @@ _base_send_ioc_reset(struct MPT3SAS_ADAPTER *ioc, u8 reset_type, int timeout) /** * mpt3sas_wait_for_ioc - IOC's operational state is checked here. * @ioc: per adapter object - * @wait_count: timeout in seconds + * @timeout: timeout in seconds * * Return: Waits up to timeout seconds for the IOC to * become operational. Returns 0 if IOC is present diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index 62e552838565..07668499ef21 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c @@ -3660,8 +3660,9 @@ static DEVICE_ATTR_RW(diag_trigger_mpi); /** * drv_support_bitmap_show - driver supported feature bitmap - * @cdev - pointer to embedded class device - * @buf - the buffer returned + * @cdev: pointer to embedded class device + * @attr: unused + * @buf: the buffer returned * * A sysfs 'read-only' shost attribute. */ @@ -3678,8 +3679,9 @@ static DEVICE_ATTR_RO(drv_support_bitmap); /** * enable_sdev_max_qd_show - display whether sdev max qd is enabled/disabled - * @cdev - pointer to embedded class device - * @buf - the buffer returned + * @cdev: pointer to embedded class device + * @attr: unused + * @buf: the buffer returned * * A sysfs read/write shost attribute. This attribute is used to set the * targets queue depth to HBA IO queue depth if this attribute is enabled. @@ -3696,8 +3698,10 @@ enable_sdev_max_qd_show(struct device *cdev, /** * enable_sdev_max_qd_store - Enable/disable sdev max qd - * @cdev - pointer to embedded class device - * @buf - the buffer returned + * @cdev: pointer to embedded class device + * @attr: unused + * @buf: the buffer returned + * @count: unused * * A sysfs read/write shost attribute. This attribute is used to set the * targets queue depth to HBA IO queue depth if this attribute is enabled.