From patchwork Wed Sep 27 06:52:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenguohua@jari.cn X-Patchwork-Id: 13400023 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E7F2E80A99 for ; Wed, 27 Sep 2023 06:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229550AbjI0G4T (ORCPT ); Wed, 27 Sep 2023 02:56:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjI0G4S (ORCPT ); Wed, 27 Sep 2023 02:56:18 -0400 X-Greylist: delayed 144 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 26 Sep 2023 23:56:17 PDT Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4F1E1A3 for ; Tue, 26 Sep 2023 23:56:16 -0700 (PDT) Received: from chenguohua$jari.cn ( [182.148.12.64] ) by ajax-webmail-localhost.localdomain (Coremail) ; Wed, 27 Sep 2023 14:52:34 +0800 (GMT+08:00) X-Originating-IP: [182.148.12.64] Date: Wed, 27 Sep 2023 14:52:34 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: chenguohua@jari.cn To: hare@suse.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: aic7xxx: Clean up errors in aic79xx_osm.h X-Priority: 3 X-Mailer: Coremail Webmail Server Version 2023.1-cmXT6 build 20230419(ff23bf83) Copyright (c) 2002-2023 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn MIME-Version: 1.0 Message-ID: <4017dacc.877.18ad5692c83.Coremail.chenguohua@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwDXaD4y0RNlkey9AA--.570W X-CM-SenderInfo: xfkh0w5xrk3tw6md2xgofq/1tbiAQAHEWUSpy8AOQACsT X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VW3Jw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following errors reported by checkpatch: ERROR: open brace '{' following enum go on the same line ERROR: return is not a function, parentheses are not required ERROR: space required after that ',' (ctx:VxV) Signed-off-by: GuoHua Cheng --- drivers/scsi/aic7xxx/aic79xx_osm.h | 37 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h index 793fe19993a9..ce3ded3402d4 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.h +++ b/drivers/scsi/aic7xxx/aic79xx_osm.h @@ -354,13 +354,13 @@ struct ahd_platform_data { void ahd_delay(long); /***************************** Low Level I/O **********************************/ -uint8_t ahd_inb(struct ahd_softc * ahd, long port); -void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val); -void ahd_outw_atomic(struct ahd_softc * ahd, +uint8_t ahd_inb(struct ahd_softc *ahd, long port); +void ahd_outb(struct ahd_softc *ahd, long port, uint8_t val); +void ahd_outw_atomic(struct ahd_softc *ahd, long port, uint16_t val); -void ahd_outsb(struct ahd_softc * ahd, long port, +void ahd_outsb(struct ahd_softc *ahd, long port, uint8_t *, int count); -void ahd_insb(struct ahd_softc * ahd, long port, +void ahd_insb(struct ahd_softc *ahd, long port, uint8_t *, int count); /**************************** Initialization **********************************/ @@ -438,8 +438,7 @@ ahd_unlock(struct ahd_softc *ahd, unsigned long *flags) #define PCIXM_STATUS_MAXCRDS 0x1C00 /* Maximum Cumulative Read Size */ #define PCIXM_STATUS_RCVDSCEM 0x2000 /* Received a Split Comp w/Error msg */ -typedef enum -{ +typedef enum { AHD_POWER_STATE_D0, AHD_POWER_STATE_D1, AHD_POWER_STATE_D2, @@ -465,21 +464,21 @@ static inline int ahd_get_pci_function(ahd_dev_softc_t); static inline int ahd_get_pci_function(ahd_dev_softc_t pci) { - return (PCI_FUNC(pci->devfn)); + return PCI_FUNC(pci->devfn); } static inline int ahd_get_pci_slot(ahd_dev_softc_t); static inline int ahd_get_pci_slot(ahd_dev_softc_t pci) { - return (PCI_SLOT(pci->devfn)); + return PCI_SLOT(pci->devfn); } static inline int ahd_get_pci_bus(ahd_dev_softc_t); static inline int ahd_get_pci_bus(ahd_dev_softc_t pci) { - return (pci->bus->number); + return pci->bus->number; } static inline void ahd_flush_device_writes(struct ahd_softc *); @@ -492,7 +491,7 @@ ahd_flush_device_writes(struct ahd_softc *ahd) /**************************** Proc FS Support *********************************/ int ahd_proc_write_seeprom(struct Scsi_Host *, char *, int); -int ahd_linux_show_info(struct seq_file *,struct Scsi_Host *); +int ahd_linux_show_info(struct seq_file *, struct Scsi_Host *); /*********************** Transaction Access Wrappers **************************/ @@ -506,7 +505,7 @@ void ahd_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) static inline void ahd_set_transaction_status(struct scb *scb, uint32_t status) { - ahd_cmd_set_transaction_status(scb->io_ctx,status); + ahd_cmd_set_transaction_status(scb->io_ctx, status); } static inline @@ -531,7 +530,7 @@ uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd) static inline uint32_t ahd_get_transaction_status(struct scb *scb) { - return (ahd_cmd_get_transaction_status(scb->io_ctx)); + return ahd_cmd_get_transaction_status(scb->io_ctx); } static inline @@ -543,7 +542,7 @@ uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd) static inline uint32_t ahd_get_scsi_status(struct scb *scb) { - return (ahd_cmd_get_scsi_status(scb->io_ctx)); + return ahd_cmd_get_scsi_status(scb->io_ctx); } static inline @@ -558,13 +557,13 @@ void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type) static inline u_long ahd_get_transfer_length(struct scb *scb) { - return (scb->platform_data->xfer_len); + return scb->platform_data->xfer_len; } static inline int ahd_get_transfer_dir(struct scb *scb) { - return (scb->io_ctx->sc_data_direction); + return scb->io_ctx->sc_data_direction; } static inline @@ -588,7 +587,7 @@ u_long ahd_get_residual(struct scb *scb) static inline u_long ahd_get_sense_residual(struct scb *scb) { - return (scb->platform_data->sense_resid); + return scb->platform_data->sense_resid; } static inline @@ -599,13 +598,13 @@ int ahd_perform_autosense(struct scb *scb) * On other platforms this is set on a * per-transaction basis. */ - return (1); + return 1; } static inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb) { - return (sizeof(struct scsi_sense_data)); + return sizeof(struct scsi_sense_data); } static inline void