From patchwork Wed Sep 27 08:24:13 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: 727002 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 15B3AE810C1 for ; Wed, 27 Sep 2023 10:40:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229985AbjI0KkZ (ORCPT ); Wed, 27 Sep 2023 06:40:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230143AbjI0IZ7 (ORCPT ); Wed, 27 Sep 2023 04:25:59 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 547C7CC4; Wed, 27 Sep 2023 01:25:41 -0700 (PDT) Received: from chenguohua$jari.cn ( [182.148.12.64] ) by ajax-webmail-localhost.localdomain (Coremail) ; Wed, 27 Sep 2023 16:24:13 +0800 (GMT+08:00) X-Originating-IP: [182.148.12.64] Date: Wed, 27 Sep 2023 16:24:13 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: chenguohua@jari.cn To: gotom@debian.or.jp, yokota@netlab.is.tsukuba.ac.jp, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: Clean up errors in nsp32_io.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: <7612214f.888.18ad5bd14bc.Coremail.chenguohua@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwDnhD+t5hNlYPi9AA--.583W X-CM-SenderInfo: xfkh0w5xrk3tw6md2xgofq/1tbiAQAHEWUSpy8AOwAgsz X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following errors reported by checkpatch: ERROR: space prohibited before that close parenthesis ')' ERROR: space required after that ',' (ctx:VxV) Signed-off-by: GuoHua Cheng --- drivers/scsi/nsp32_io.h | 18 +++++++++--------- drivers/scsi/scsi_pm.c | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/nsp32_io.h b/drivers/scsi/nsp32_io.h index e3f3c27b01ef..5902f3035afa 100644 --- a/drivers/scsi/nsp32_io.h +++ b/drivers/scsi/nsp32_io.h @@ -126,7 +126,7 @@ static inline void nsp32_index_write1(unsigned int base, unsigned int reg, unsigned char val) { - outb(reg, base + INDEX_REG ); + outb(reg, base + INDEX_REG); outb(val, base + DATA_REG_LOW); } @@ -141,18 +141,18 @@ static inline void nsp32_index_write2(unsigned int base, unsigned int reg, unsigned short val) { - outb(reg, base + INDEX_REG ); + outb(reg, base + INDEX_REG); outw(val, base + DATA_REG_LOW); } static inline unsigned long nsp32_index_read4(unsigned int base, unsigned int reg) { - unsigned long h,l; + unsigned long h, l; outb(reg, base + INDEX_REG); l = inw(base + DATA_REG_LOW); - h = inw(base + DATA_REG_HI ); + h = inw(base + DATA_REG_HI); return ((h << 16) | l); } @@ -161,14 +161,14 @@ static inline void nsp32_index_write4(unsigned int base, unsigned int reg, unsigned long val) { - unsigned long h,l; + unsigned long h, l; h = (val & 0xffff0000) >> 16; l = (val & 0x0000ffff) >> 0; - outb(reg, base + INDEX_REG ); + outb(reg, base + INDEX_REG); outw(l, base + DATA_REG_LOW); - outw(h, base + DATA_REG_HI ); + outw(h, base + DATA_REG_HI); } /*==============================================*/ @@ -195,7 +195,7 @@ static inline void nsp32_mmio_index_write1(unsigned long base, data_ptr = (unsigned short *)(base + NSP32_MMIO_OFFSET + DATA_REG_LOW); writeb(reg, index_ptr); - writeb(val, data_ptr ); + writeb(val, data_ptr); } static inline unsigned short nsp32_mmio_index_read2(unsigned long base, @@ -220,7 +220,7 @@ static inline void nsp32_mmio_index_write2(unsigned long base, data_ptr = (unsigned short *)(base + NSP32_MMIO_OFFSET + DATA_REG_LOW); writeb(reg, index_ptr); - writew(cpu_to_le16(val), data_ptr ); + writew(cpu_to_le16(val), data_ptr); } /*==============================================*/ diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c index d581613d87c7..ee44fded8e55 100644 --- a/drivers/scsi/scsi_pm.c +++ b/drivers/scsi/scsi_pm.c @@ -218,7 +218,7 @@ int scsi_autopm_get_device(struct scsi_device *sdev) int err; err = pm_runtime_get_sync(&sdev->sdev_gendev); - if (err < 0 && err !=-EACCES) + if (err < 0 && err != -EACCES) pm_runtime_put_sync(&sdev->sdev_gendev); else err = 0; @@ -247,7 +247,7 @@ int scsi_autopm_get_host(struct Scsi_Host *shost) int err; err = pm_runtime_get_sync(&shost->shost_gendev); - if (err < 0 && err !=-EACCES) + if (err < 0 && err != -EACCES) pm_runtime_put_sync(&shost->shost_gendev); else err = 0;