From patchwork Sun Jul 28 14:00:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 11062951 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EA7981580 for ; Sun, 28 Jul 2019 14:01:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D969027CEE for ; Sun, 28 Jul 2019 14:01:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE05528724; Sun, 28 Jul 2019 14:01:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 584092818E for ; Sun, 28 Jul 2019 14:01:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726120AbfG1OBO (ORCPT ); Sun, 28 Jul 2019 10:01:14 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33404 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbfG1OBN (ORCPT ); Sun, 28 Jul 2019 10:01:13 -0400 Received: by mail-pf1-f193.google.com with SMTP id g2so26676503pfq.0; Sun, 28 Jul 2019 07:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uuwYrXeTAInUcsW+AxJJ0/aljjnfiTTX/+5Vzm4lAp0=; b=VMV03RvUP8JqlIsbv16BFp874wVTGm973jaN6O2HhBRRX44NFN7OuPXCkkX4o6h+LJ QDrPMLZDkTlZwo8R4ZnhP1clBUKyKO5UJsxvTc92a54pIUxc6ttS9lDod6ewRivcRqwU D/ypaiKuOn93UkB6JN28KB8/hn1lsmAiVQVM7ClsrllY8ctybsm7BIB8VOZj1SYuSIxJ 2XLDZl03f48sydaW9qR5ngHxeMPRFcR34qHxuCPd4ZRWkowaLDQX3qdi5aPzkXFF/5Bg ztsi5luM86IkMm3aWNpYT8UoHljbBZ17+ww9E70lAGp2HnAiIGdXzs/bm/2JfpwrM5VY HzNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uuwYrXeTAInUcsW+AxJJ0/aljjnfiTTX/+5Vzm4lAp0=; b=LlvIEJeDyGKOl06uZ0AW2p+s1FstRnr7dr6viOKF0dk7000fgjxKo3BTi4seYAMS4n LjKc3I/WPqRZE3YOw9p4/Xe2ACP7v6LQmpBFk9YUNQO5CMJTWepDkiaY9naRGM8X1OHr +C/nj9Pn4QJCYseYyTZuODK/txAcp/DoRfnZb8Xyvnt7eGLilQyt5t0G2qFt7l6/ZYI6 03huRa9QqqI0mKLBq5jwekySoMGJi4uZ6CbsY4gAPtO5G4vQ1GUJa2b+CGJ1gmHSnNLd dsIauL1k7ZJLvFJDWLZFdGF8R/Kyae5Bi+nwYxDegte/urDYNzIwqyBVVS3QFuMgGgLa aWUQ== X-Gm-Message-State: APjAAAVI96uWc3QeaEvL21pBYMZMQZExfq5HHP3ogfkTEE9cPtU7A7aV TTAYShDh+MtKwE41qe7X7FwDVZw1 X-Google-Smtp-Source: APXvYqzyW8T2QREIQIwTlovir+WOf8ENXRzaKnHbjTBI2DNhmWr5qQB+cRkvkgEYIlgct2HXopBnEw== X-Received: by 2002:a62:6454:: with SMTP id y81mr30687153pfb.13.1564322472756; Sun, 28 Jul 2019 07:01:12 -0700 (PDT) Received: from mita-MS-7A45.lan ([240f:34:212d:1:c118:b59:e3b3:19e7]) by smtp.gmail.com with ESMTPSA id k36sm59911042pgl.42.2019.07.28.07.01.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Jul 2019 07:01:12 -0700 (PDT) From: Akinobu Mita To: linux-block@vger.kernel.org, linux-leds@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Akinobu Mita , Frank Steiner , Jacek Anaszewski , Pavel Machek , Dan Murphy , Jens Axboe , "James E.J. Bottomley" , "Martin K. Petersen" Subject: [PATCH 1/3] block: umem: rename LED_* macros to LEDCTRL_* Date: Sun, 28 Jul 2019 23:00:44 +0900 Message-Id: <1564322446-28255-2-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564322446-28255-1-git-send-email-akinobu.mita@gmail.com> References: <1564322446-28255-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The umem driver defines LED_* macros for MEMCTRLCMD_LEDCTRL register values. The LED_OFF and LED_ON macros conflict with the LED subsystem's LED_OFF and LED_ON enums. This renames these LED_* macros to LEDCTRL_* in umem driver. Cc: Frank Steiner Cc: Jacek Anaszewski Cc: Pavel Machek Cc: Dan Murphy Cc: Jens Axboe Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Akinobu Mita Reviewed-by: Hannes Reinecke --- drivers/block/umem.c | 20 ++++++++++---------- drivers/block/umem.h | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 1f3f9e0..ea63c14 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c @@ -167,14 +167,14 @@ static int set_userbit(struct cardinfo *card, int bit, unsigned char state) } /* - * NOTE: For the power LED, use the LED_POWER_* macros since they differ + * NOTE: For the power LED, use the LEDCTRL_POWER_* macros since they differ */ static void set_led(struct cardinfo *card, int shift, unsigned char state) { unsigned char led; led = readb(card->csr_remap + MEMCTRLCMD_LEDCTRL); - if (state == LED_FLIP) + if (state == LEDCTRL_FLIP) led ^= (1<desc[page->headcnt]; writel(0, card->csr_remap + DMA_PCI_ADDR); @@ -477,7 +477,7 @@ static void process_page(unsigned long data) } if (debug & DEBUG_LED_ON_TRANSFER) - set_led(card, LED_REMOVE, LED_OFF); + set_led(card, LEDCTRL_REMOVE, LEDCTRL_OFF); if (card->check_batteries) { card->check_batteries = 0; @@ -652,13 +652,13 @@ HW_TRACE(0x36); static void set_fault_to_battery_status(struct cardinfo *card) { if (card->battery[0].good && card->battery[1].good) - set_led(card, LED_FAULT, LED_OFF); + set_led(card, LEDCTRL_FAULT, LEDCTRL_OFF); else if (card->battery[0].warned || card->battery[1].warned) - set_led(card, LED_FAULT, LED_ON); + set_led(card, LEDCTRL_FAULT, LEDCTRL_ON); else if (!card->battery[0].good && !card->battery[1].good) - set_led(card, LED_FAULT, LED_FLASH_7_0); + set_led(card, LEDCTRL_FAULT, LEDCTRL_FLASH_7_0); else - set_led(card, LED_FAULT, LED_FLASH_3_5); + set_led(card, LEDCTRL_FAULT, LEDCTRL_FLASH_3_5); } static void init_battery_timer(void); @@ -919,8 +919,8 @@ static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) } /* Clear the LED's we control */ - set_led(card, LED_REMOVE, LED_OFF); - set_led(card, LED_FAULT, LED_OFF); + set_led(card, LEDCTRL_REMOVE, LEDCTRL_OFF); + set_led(card, LEDCTRL_FAULT, LEDCTRL_OFF); batt_status = readb(card->csr_remap + MEMCTRLSTATUS_BATTERY); diff --git a/drivers/block/umem.h b/drivers/block/umem.h index 5838497..8563fdc 100644 --- a/drivers/block/umem.h +++ b/drivers/block/umem.h @@ -32,16 +32,16 @@ #define MEM_2_GB 0xe0 #define MEMCTRLCMD_LEDCTRL 0x08 -#define LED_REMOVE 2 -#define LED_FAULT 4 -#define LED_POWER 6 -#define LED_FLIP 255 -#define LED_OFF 0x00 -#define LED_ON 0x01 -#define LED_FLASH_3_5 0x02 -#define LED_FLASH_7_0 0x03 -#define LED_POWER_ON 0x00 -#define LED_POWER_OFF 0x01 +#define LEDCTRL_REMOVE 2 +#define LEDCTRL_FAULT 4 +#define LEDCTRL_POWER 6 +#define LEDCTRL_FLIP 255 +#define LEDCTRL_OFF 0x00 +#define LEDCTRL_ON 0x01 +#define LEDCTRL_FLASH_3_5 0x02 +#define LEDCTRL_FLASH_7_0 0x03 +#define LEDCTRL_POWER_ON 0x00 +#define LEDCTRL_POWER_OFF 0x01 #define USER_BIT1 0x01 #define USER_BIT2 0x02 From patchwork Sun Jul 28 14:00:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 11062955 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAF8813A4 for ; Sun, 28 Jul 2019 14:01:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC28927CEE for ; Sun, 28 Jul 2019 14:01:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFD0228747; Sun, 28 Jul 2019 14:01:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AB2027CEE for ; Sun, 28 Jul 2019 14:01:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726148AbfG1OBT (ORCPT ); Sun, 28 Jul 2019 10:01:19 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35661 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbfG1OBS (ORCPT ); Sun, 28 Jul 2019 10:01:18 -0400 Received: by mail-pg1-f196.google.com with SMTP id s1so20606830pgr.2; Sun, 28 Jul 2019 07:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/XMXgmnlnByuPDG+i9evCH1V2lk/xNNqdwLnBs7ygAA=; b=NSw6Ca4remyYSoKED7/pL1ofjE6N1tnQT8YBy9PpseseeWGqpRuOnvwcCu2pKh6O+K xpVzqN4gqRdKNiho1uHT3pmrw+ZVNI4LfLsbWtUnJnozgXrHPBoldWX4unXSDXS4u1OE eV38cEFmAHmczInsA80w/JJEqxGDtCSEW2cU/r3yeNZiZr3FG0KyLJOpkIpxeRkdMuUz LEKZwedGlZqnKoJ+kh+YPyfE+1Um/sd9ddPWJ1L35xggjjIdOPneUQ7IcSaR7vB2LvgC AA9goHVAu7UujbUnN/H1dT2Mg1bgoD9WAw11Z185Omde0t0DO1C1cAST3KLDICdNHG4y T36A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/XMXgmnlnByuPDG+i9evCH1V2lk/xNNqdwLnBs7ygAA=; b=EePfOQOwNJE14HxwWC3OvQir/pQIQKZ3/Ok2i0M0x4TWcOTa25nsPFnYmhMECYsG3p aPqTAxbeyzQDbOqT6N/4ZHDbfMa2K1AH8bhYhHF2kESZLp1PHbrJ8ELEDFQC0mf1qhWX 7njUP+TfnqmvqUv+QFJG5NXwWWSeAMkFDOQs2nzfHZgfyfaqrzgUN1oEaJoOEnE7YuEI iWRSLgUDxpu8qlLNLCcRnmi61ioRSZXUAC0qAJtSE3PmDWAPR9LN+2eeYy2EdTIppSxn BX4lVySFgBtzv8vE7OhFQ4Fz946Qu+ZP5U/0noVDjWAoOC5Wj77J5jcwzLVhonVW91mc N44Q== X-Gm-Message-State: APjAAAVCIkvx8jeqUAgU10gjmdCmB9pq12TMu+VFmNuyzM1TWDtvzehf Cu2YZ1dfroNtXOXm3IMMMJUd6FOM X-Google-Smtp-Source: APXvYqzRBdv3B2l6rH1Dg6rPzFysT6j//MEHxEopL+OUuFkPG4LWaB0zF1O1/mZFNFI4Y+L6tlrzBA== X-Received: by 2002:a63:10a:: with SMTP id 10mr15991252pgb.281.1564322477896; Sun, 28 Jul 2019 07:01:17 -0700 (PDT) Received: from mita-MS-7A45.lan ([240f:34:212d:1:c118:b59:e3b3:19e7]) by smtp.gmail.com with ESMTPSA id k36sm59911042pgl.42.2019.07.28.07.01.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Jul 2019 07:01:17 -0700 (PDT) From: Akinobu Mita To: linux-block@vger.kernel.org, linux-leds@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Akinobu Mita , Frank Steiner , Jacek Anaszewski , Pavel Machek , Dan Murphy , Jens Axboe , "James E.J. Bottomley" , "Martin K. Petersen" Subject: [PATCH 2/3] scsi: mvsas: rename LED_* enums to SGPIO_LED_* Date: Sun, 28 Jul 2019 23:00:45 +0900 Message-Id: <1564322446-28255-3-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564322446-28255-1-git-send-email-akinobu.mita@gmail.com> References: <1564322446-28255-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The mvsas driver declares LED_* enums for enum sgpio_led_status. The LED_OFF and LED_ON enums cause redeclaration of enumerator with the LED subsystem's LED_OFF and LED_ON enums. This adds 'SGPIO_' prefix to these enums in mvsas driver. Cc: Frank Steiner Cc: Jacek Anaszewski Cc: Pavel Machek Cc: Dan Murphy Cc: Jens Axboe Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Akinobu Mita Reviewed-by: Hannes Reinecke Acked-by: Pavel Machek --- drivers/scsi/mvsas/mv_94xx.c | 2 +- drivers/scsi/mvsas/mv_94xx.h | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c index fc0b8eb..3558a625 100644 --- a/drivers/scsi/mvsas/mv_94xx.c +++ b/drivers/scsi/mvsas/mv_94xx.c @@ -1085,7 +1085,7 @@ static int mvs_94xx_gpio_write(struct mvs_prv_info *mvs_prv, block &= ~((0x7 << MVS_SGPIO_DCTRL_ACT_SHIFT) << driveshift); /* hardwire activity bit to SOF */ - block |= LED_BLINKA_SOF << ( + block |= SGPIO_LED_BLINKA_SOF << ( MVS_SGPIO_DCTRL_ACT_SHIFT + driveshift); break; diff --git a/drivers/scsi/mvsas/mv_94xx.h b/drivers/scsi/mvsas/mv_94xx.h index a243182..2c96ff1 100644 --- a/drivers/scsi/mvsas/mv_94xx.h +++ b/drivers/scsi/mvsas/mv_94xx.h @@ -275,23 +275,23 @@ enum sgpio_registers { }; enum sgpio_led_status { - LED_OFF = 0, - LED_ON = 1, - LED_BLINKA = 2, - LED_BLINKA_INV = 3, - LED_BLINKA_SOF = 4, - LED_BLINKA_EOF = 5, - LED_BLINKB = 6, - LED_BLINKB_INV = 7, + SGPIO_LED_OFF = 0, + SGPIO_LED_ON = 1, + SGPIO_LED_BLINKA = 2, + SGPIO_LED_BLINKA_INV = 3, + SGPIO_LED_BLINKA_SOF = 4, + SGPIO_LED_BLINKA_EOF = 5, + SGPIO_LED_BLINKB = 6, + SGPIO_LED_BLINKB_INV = 7, }; -#define DEFAULT_SGPIO_BITS ((LED_BLINKA_SOF << \ +#define DEFAULT_SGPIO_BITS ((SGPIO_LED_BLINKA_SOF << \ MVS_SGPIO_DCTRL_ACT_SHIFT) << (8 * 3) | \ - (LED_BLINKA_SOF << \ + (SGPIO_LED_BLINKA_SOF << \ MVS_SGPIO_DCTRL_ACT_SHIFT) << (8 * 2) | \ - (LED_BLINKA_SOF << \ + (SGPIO_LED_BLINKA_SOF << \ MVS_SGPIO_DCTRL_ACT_SHIFT) << (8 * 1) | \ - (LED_BLINKA_SOF << \ + (SGPIO_LED_BLINKA_SOF << \ MVS_SGPIO_DCTRL_ACT_SHIFT) << (8 * 0)) /* From patchwork Sun Jul 28 14:00:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 11062961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E8571580 for ; Sun, 28 Jul 2019 14:01:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F5D027CEE for ; Sun, 28 Jul 2019 14:01:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43AC228724; Sun, 28 Jul 2019 14:01:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA1032818E for ; Sun, 28 Jul 2019 14:01:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726082AbfG1OB2 (ORCPT ); Sun, 28 Jul 2019 10:01:28 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:46926 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbfG1OB1 (ORCPT ); Sun, 28 Jul 2019 10:01:27 -0400 Received: by mail-pf1-f196.google.com with SMTP id c3so3534033pfa.13; Sun, 28 Jul 2019 07:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NRafqqL/OnqN2ZpY7kTQX7CWX4qWrQHLhACG154FPvw=; b=TkILfb/0g5zGSSi3I/bK9urvqTntxorYMX3rWE0QQXHwCwO3GDzLZStgEyMogD4+V/ 2Rml+GYYCNDMmdk4gSEF7Z3vAfEXAQQTliEUiAFWW+3uRXyxD0eFJsnIBbaEtQiubtUs I5LnYUT0W9BhRPpKBxVlirfqzcUNEae8HU84TOfaUMA86XTnOcvmXZO694ZDDgPJUI2N v+xyP7EZO+kXCny7wRJVx2Hsbf343K6FQfvFTyU4TQpMR7+EstRnuXG6MgW7LW6MzZhl WsbqxqOPKqemP3zacj6FoS7bjIepsrjixQ2LGwCzrDtH9H+wNHninVEIcRV2yDmV0BFs KnmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NRafqqL/OnqN2ZpY7kTQX7CWX4qWrQHLhACG154FPvw=; b=pLjS2Vo4DfEVx+rZeywB5uERGiJqisYJeBXWT3LmJBaUXy4+JQmMi8HffagHWQTT1e i4x1Q1fwSHbyFIdBvt7hliHHucBd9O5nQir4GJPIvCPNk/gh/Ja1Fkm0y8MLoZRB2rp1 v/5KVvz5Hhy0A0iFE0xbe1icHHxuZhI1IftH/Xu8ey6rsyN5sdKxrJGXdHXUBEuXFoPX M4pGZH7CmLSYjFiMmrRjD1NV2eaD/Y6h2JxGJvRjKZr32NcyWEO0awMluboh8B0d8O0C h5qmRDPV+fLPg4eKIVTZr2z6jG+wNrxYks3nX3Pv1vczYYIqXVPXFwXwnL76W5bfV6Ur eaIg== X-Gm-Message-State: APjAAAUr5mWIvnOqv0UQGY1JfWhuz0il+GF0ZLwbSF4tuw8KfMWTsYss ulYcQdRV+/UmGgfd2zhtNPIwo70g X-Google-Smtp-Source: APXvYqzAci1FG8L/T/tBkvm8atyPsd9NaE9XTWBINy6Da8ZRwSqvc3ek3yObSOKWfnjOmqFBAPk8WQ== X-Received: by 2002:a17:90a:cb81:: with SMTP id a1mr104603570pju.81.1564322487093; Sun, 28 Jul 2019 07:01:27 -0700 (PDT) Received: from mita-MS-7A45.lan ([240f:34:212d:1:c118:b59:e3b3:19e7]) by smtp.gmail.com with ESMTPSA id k36sm59911042pgl.42.2019.07.28.07.01.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Jul 2019 07:01:26 -0700 (PDT) From: Akinobu Mita To: linux-block@vger.kernel.org, linux-leds@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Akinobu Mita , Frank Steiner , Jacek Anaszewski , Pavel Machek , Dan Murphy , Jens Axboe , "James E.J. Bottomley" , "Martin K. Petersen" , GOTO Masanori , YOKOTA Hiroshi Subject: [PATCH 3/3] scsi: nsp32: rename LED_* macros to EXT_PORT_LED_* Date: Sun, 28 Jul 2019 23:00:46 +0900 Message-Id: <1564322446-28255-4-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564322446-28255-1-git-send-email-akinobu.mita@gmail.com> References: <1564322446-28255-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The nsp32 driver defines LED_ON and LED_OFF macros for EXT_PORT_DDR or EXT_PORT register values. The LED_OFF and LED_ON macros conflict with the LED subsystem's LED_OFF and LED_ON enums. This renames these LED_* macros to EXT_PORT_LED_* in nsp32 driver. Cc: Frank Steiner Cc: Jacek Anaszewski Cc: Pavel Machek Cc: Dan Murphy Cc: Jens Axboe Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: GOTO Masanori Cc: YOKOTA Hiroshi Signed-off-by: Akinobu Mita Reviewed-by: Hannes Reinecke Acked-by: Pavel Machek --- drivers/scsi/nsp32.c | 6 +++--- drivers/scsi/nsp32.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index 70db792..330cf4c 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c @@ -763,7 +763,7 @@ static int nsp32_arbitration(struct scsi_cmnd *SCpnt, unsigned int base) if (arbit & ARBIT_WIN) { /* Arbitration succeeded */ SCpnt->result = DID_OK << 16; - nsp32_index_write1(base, EXT_PORT, LED_ON); /* PCI LED on */ + nsp32_index_write1(base, EXT_PORT, EXT_PORT_LED_ON); /* PCI LED on */ } else if (arbit & ARBIT_FAIL) { /* Arbitration failed */ SCpnt->result = DID_BUS_BUSY << 16; @@ -1137,8 +1137,8 @@ static int nsp32hw_init(nsp32_hw_data *data) nsp32_write2(base, IRQ_CONTROL, 0); /* PCI LED off */ - nsp32_index_write1(base, EXT_PORT_DDR, LED_OFF); - nsp32_index_write1(base, EXT_PORT, LED_OFF); + nsp32_index_write1(base, EXT_PORT_DDR, EXT_PORT_LED_OFF); + nsp32_index_write1(base, EXT_PORT, EXT_PORT_LED_OFF); return TRUE; } diff --git a/drivers/scsi/nsp32.h b/drivers/scsi/nsp32.h index ab0726c..a7553ea 100644 --- a/drivers/scsi/nsp32.h +++ b/drivers/scsi/nsp32.h @@ -306,8 +306,8 @@ typedef u16 u16_le; #define EXT_PORT_DDR 0x02 /* BASE+08, IDX+02, B, R/W */ #define EXT_PORT 0x03 /* BASE+08, IDX+03, B, R/W */ -# define LED_ON (0) -# define LED_OFF BIT(0) +# define EXT_PORT_LED_ON (0) +# define EXT_PORT_LED_OFF BIT(0) #define IRQ_SELECT 0x04 /* BASE+08, IDX+04, W, R/W */ # define IRQSELECT_RESELECT_IRQ BIT(0)