Message ID | 20230707095513.64224-9-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3154761vqx; Fri, 7 Jul 2023 03:11:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlG5JLjcUXf8HKIEJJrt/LUmKOeWvmiQPno3cOpB6UjBhFVw8XV4LYZ0RDAmMz/VzmfJY6dJ X-Received: by 2002:a05:6808:c8:b0:3a1:188c:9311 with SMTP id t8-20020a05680800c800b003a1188c9311mr4219725oic.24.1688724696178; Fri, 07 Jul 2023 03:11:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688724696; cv=pass; d=google.com; s=arc-20160816; b=kzFzizMPS1+7aGDVKaMp3EGmM9MEOZU2A8X9EE7X5Y0e+C8qZLKUSJ+cPcE/CrELLB 4r5pqEBym25ZLZTuuA6VZ81dECtGGpj/RUHrT7XQdYTu59Z+Zfrq4ENW2OrBiPMDrOlz zoeuDBpT73yT6rvnkNVnljVNfeXEomfC+KS6Tk7eNVEA6jCsF5QYyq9bGHBvKplCBt1t ek7oRT2l6o8Gb68v26epo25zXZ7652TdSbMfT7DFI0Nu40XlauqBRTkWB+J1LvNgwlVk T1TEHdm5IpPQiWJiMvoWvYYnj/tzMjOLA3x/Uv78UGKE4cmIKHr7Zxho4Le1ig0GatXD OHTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=W7rKm46yghVwpIKxFNuMC7ELvRRDG4mgU1qxb7VStsU=; fh=KemUqYlx44+jLiX8LKEgRFmEZtcjyKeavCeH1++RIPw=; b=qG8qFUYjqoAN3A/o2KCpy+/puf/qKINS9qZ97nisIQL1LJOApyXc1y7oFFbEX/iSqY XGgRe6gpfeUe/tf2/o3RGmYlkZctPdIIpRMU0IarxwtRzaLe+6Q4Y47UvbtmY1dH3KGR ewCHUdvaUm7CKFdLMeyn7XVk5EAwzA3Zt2QyWmaW/qgsK84eyXLhJbuWp5ue86Uuid2J aqfkNKbVaJ6Quv2QOcKGefd09m2EU/zJWM6jVdmSMtlaN7QoE/994nQcWwuua5rDjPki eeqMlQUf4Xlw1lc/eZpOnL5JYBjIpybNmJlinfjQFHq9xzMhl8lumbS57vctqZh6gTvD NaNg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fWPFREtV; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n37-20020a634d65000000b00557622c1ca0si3511448pgl.554.2023.07.07.03.11.18; Fri, 07 Jul 2023 03:11:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fWPFREtV; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233106AbjGGJ4l (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Fri, 7 Jul 2023 05:56:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232893AbjGGJzp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 7 Jul 2023 05:55:45 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2138.outbound.protection.outlook.com [40.107.255.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2AF11737; Fri, 7 Jul 2023 02:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kMBRh4W9JRb1dIKXUn1Wpe8xW+uBE9dkz4Nl7jNK/lZRS2bvwE4CvYitNxLAxTA/j+hG266u2yRJRspqIUg6af4fWhYOELO5kS9HXJNSukslfeb4vi0+4zGUqueunLGqDjIFECCfCmTJ463+JqalG1j/2w7Z9r1cypYPxWCUkY3eS3wWpCu1GNONuSyZwbJW8ISLaGPk/w7ILELs04RRL2EgcVUG+cZAuYj38BhDSI5HVHZ+RjxYWTF9x78OYS99vcPea1kfsTUpOYN3J2GqVmbG3DTh1HNgQLPOpqZlB/u8+SIs66Yh5sADd/HkIiUb1yJAyYgcuPj+icnlcjd7vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=W7rKm46yghVwpIKxFNuMC7ELvRRDG4mgU1qxb7VStsU=; b=aRRGP2YUIJ9PVap8PGY3yYu/m2JNhCRTwWpZLrJEMwfRqzxhMxSAEf2aWuTyhzql53Jp5ZPM8wKtJFEcLXFMMWaB1fPESjK9wucNoIn3VarwtBLj7wfsSVtYsE3AD8h/stoLoYRUfGGipESc7WYk1xw8hSNbLqGU0EGlz8UND6huOe7Z3IUASJ7V4EzhREMCszCyRmVEbBKEIomt0KfULJ74hlkhqnMtw7KjwDNuRhgK6/KxQlkh4Hi3E7OhWeSRbhbOYNY5GrnNzGXzW7SdtsHCtfosAKYC92fZjqW/WTlOEbPoIgW5bZxhsb6iBYvXMHjZXW3e8ujYOwUFAUIuBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W7rKm46yghVwpIKxFNuMC7ELvRRDG4mgU1qxb7VStsU=; b=fWPFREtV/avYeOujq8v6Bxd4xMQuqdos29OGsfD2mNhje5ZaAGwJMhyzT6IddPXE3tIdyMoiyDbZCHkbOHByXk95LnuBb5S1Rvu0nkfVGdl/cn+/uTwr/+1AZlLbbIApg1n2ms41GWJTwGv9eB/qgGVHMBDen/p7Hh04ZTxWGyLwamr0qJsQ0b9+2TruvCdzp74BbxJ1XPSUJKZzfAjE5S3R5HdcLkhAER7YcfCjRnC5p0NGKiJ2WIoftarjyqrcXAHRVCfE/ogPHWSJzZaowhx9L6CIGhjaU2yqP2SJAHkdSKLsfnJKODbJNZX8mHNQ5+RVvR2fJEKmhlcIoLPZMQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB4356.apcprd06.prod.outlook.com (2603:1096:820:6d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Fri, 7 Jul 2023 09:55:41 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.025; Fri, 7 Jul 2023 09:55:41 +0000 From: Yangtao Li <frank.li@vivo.com> To: Sergey Shtylyov <s.shtylyov@omp.ru>, Damien Le Moal <dlemoal@kernel.org> Cc: Yangtao Li <frank.li@vivo.com>, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 09/11] ata: pata_ixp4xx: Remove unnecessary return value check Date: Fri, 7 Jul 2023 17:55:11 +0800 Message-Id: <20230707095513.64224-9-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707095513.64224-1-frank.li@vivo.com> References: <20230707095513.64224-1-frank.li@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2P153CA0004.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::23) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4356:EE_ X-MS-Office365-Filtering-Correlation-Id: dda7866d-2020-4390-a93d-08db7ed052b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BNPexBnss4qSZyy8LtheV9mBMY+ZgVk/Sufxp0YM+OEuoQNq9BpSZ2NwEmQaSkRwt0fprObc/bfWbMqT53e6c7VxmPfSXsHxa7+DTL2jRv1os/3oAfm8AaDKsEAvefUgfdSYBaeDt1g9aBnAUhe7Q80b8ZCn4pfaziYnG9BO4jwZ8IA8CdhK5KRfGAwFOWH/I5su7AP5Pij1qFCRTZ/P9/YQiA33cm9+T4gNsFI26jDYmxq1cve1fIfAFzQctlfTQcaimWnoMpzJSXVwFHSXVAaKY7sgnoAZxDozEYGwGMn66H4QwLXmGHy0iZq7YuuVwXEKMY5G77EjZF/Dcwwac8U0t9F1iA3ID33vjpRZeN88YVThytOzHNdF/I2ZSwQ4JwLhXevcyX7ehpdJTHrQuX/fffJ9Q/4e8MetBDELxozCjQEphytgOKoAjO/RLUdqXGWXNssL/wCvLvh0BCRhHrvgwOtD57IM0KK6J6MzQptPBaPrhl1bMtX+M/+JTJY5mc8GI9XHc6s8qcDaPjJ0fAhhuVRIgOjU80g5hw0zDapQ0uarAI+9uKIWjQ+ko4H41RnBXGBpIzEvPee3qpazqyhTxtniq8uIDvO2E/7gBJXO8a2udpD+Ve/Jzqx9HxD0 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(136003)(39860400002)(346002)(376002)(396003)(451199021)(38350700002)(38100700002)(2616005)(186003)(6506007)(26005)(4744005)(41300700001)(8936002)(5660300002)(66476007)(6486002)(2906002)(52116002)(36756003)(86362001)(110136005)(316002)(66946007)(1076003)(6666004)(6512007)(478600001)(83380400001)(66556008)(4326008)(8676002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nOlgNHpx6RXlzbRFogWoqtnvCRcbh7ahArk222xH4Dq5ZFwK4ezGXct1951h86DzikLbAsLYTYOGuRenyQNWxbn9EuK5BwAqQ5BBkxqdSIND3IA64DWlNXq6jIfgFxdd3CJ43n5CKSeQUjlSiDFuz+tIvMuuxo9jBuhkMC3ozJ1f3chPbQS7rPgqlY3+v5JwdaaDtMmfKfkbD3DK18gkfdR11Gbn8f+6rD9td9X/yM/WNqun3k4mNl6xPGefZEbS2uDhj6aXEbS7Wf3KM+Gi+B+7G4gcV0QZPtQdKSfLKGuYp3H9KTSSWtLiNdnJY+/fzw3IIj0FdqDnmeWMmSDxEqFCukSQODQOvTGVqcVZAV3GaE7c/6ueWzv+elXxUbgaVIxShcnZGmP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KjjucDXvDNUg7LHORdRjCHvxfZIA579l912RwJdES/99iFrCkAJoryQigxU+KHcThr4kapWYvACZP+eDIqOBAaaVmNMdxX65NPxYqTFJ6F1/Gg5E/gWuU6TXv X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dda7866d-2020-4390-a93d-08db7ed052b4 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 09:55:41.1002 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XynZJJd27PMOaMRy75RDfuEg/JHDL7D4jJm2N4QoIDNVOCzMbIrPGDVm3pNF5VzztOxZ10m5sQMEv6Y9esVQ1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4356 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770756187132352808?= X-GMAIL-MSGID: =?utf-8?q?1770756187132352808?= |
Series |
[v2,01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource()
|
|
Commit Message
李扬韬
July 7, 2023, 9:55 a.m. UTC
As commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0
is invalid") says, there is no need to check if the platform_get_irq
return value is 0. Let's remove it.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/ata/pata_ixp4xx_cf.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Comments
On 7/7/23 12:55 PM, Yangtao Li wrote: > As commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0 > is invalid") says, there is no need to check if the platform_get_irq > return value is 0. Let's remove it. Again, you refer to a wrong coommit, you need: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce753ad1549cbe9ccaea4c06a1f5fa47432c8289 > Signed-off-by: Yangtao Li <frank.li@vivo.com> Aside from that: Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> [...] MBR, Sergey
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index 1b9f67e16864..246bb4f8f1f7 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c @@ -274,12 +274,9 @@ static int ixp4xx_pata_probe(struct platform_device *pdev) return PTR_ERR(ixpp->ctl); irq = platform_get_irq(pdev, 0); - if (irq > 0) - irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING); - else if (irq < 0) + if (irq < 0) return irq; - else - return -EINVAL; + irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING); /* Just one port to set up */ ixp4xx_setup_port(ixpp->host->ports[0], ixpp, cmd->start, ctl->start);