From patchwork Tue Mar 7 17:30:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 65746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2563605wrd; Tue, 7 Mar 2023 09:37:23 -0800 (PST) X-Google-Smtp-Source: AK7set9up3lVPr5EKlKP7nSrF0RtaLKblq/YSQvY/PVpK4GgaUVBkv8mipHA75301EeJ0Mp2Xjtp X-Received: by 2002:a17:906:9744:b0:900:a150:cea3 with SMTP id o4-20020a170906974400b00900a150cea3mr19621742ejy.9.1678210643382; Tue, 07 Mar 2023 09:37:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678210643; cv=none; d=google.com; s=arc-20160816; b=s8Yap8hUfBfQgOL/R1Nl/rYh9n72iFt3HP4iYtrpJK6K/MMQH8vTbEZFAnpbC+RnDO f13wWpI7d3KqhpquQ09HwjhksVBxH73X7mK8QotA2uPezVy0r6G9xQO7CcIpqWrwMTss mUPWfkYCs9+T5Q/9Sgn0pda5PDv3xHyWlzX5gSBbIx7d8u7F6RmvoCtEdplx4D545huT mimps3kpCnlopoSxOMpiSg97cV9FCRZRYPndfsG25E+scJ7ID2x+TXLwyw6qPZFdrH2k iIxU9DVvmHsOmHFOKOGYSxL0yRCyzAhS9CCNamEyZhSfLwhbdaQtByZ0APC7hzr0oRj0 YNBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PKKOuaAa2gBguzQqapfZCABAxRkqv+t5CDo+WBJoBjM=; b=aOvsxWCmKkR8Kymsc7hQI5rjLVbFfSHdwuM3Beta7LMzKhQGaEGlwjLyntUxtZDJBE g4UO8jX2fY626h7jz+HyU+wFd5zLCZh9LIKQEOogjhMcTg+hghJUU10x7JpwRrRZUZQ6 UmbDoL4+JqqWNOZ0V71hhXexJz1jzv3ZCxPH1WFDsScwnRzBE1Fyhx4kZ2yFn3RRdyr2 lHSlH/r3VJ7iPrnnl3JdlCcmeAtcC6UMdUpJV9e7wiJQZNrpWVipqw4KPx2fSbkpSwi+ vAOezlOVtih3AF+Nm5vt2X0CTpg8ItduDy5bXGvmXou3V+S2U+iNe37xTbTU0TgiUhty IQOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=zDZ9PuGL; 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=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xo6-20020a170907bb8600b008b32ee5f40asi42560ejc.399.2023.03.07.09.36.44; Tue, 07 Mar 2023 09:37:23 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b=zDZ9PuGL; 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=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231745AbjCGRf3 (ORCPT + 99 others); Tue, 7 Mar 2023 12:35:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbjCGRfG (ORCPT ); Tue, 7 Mar 2023 12:35:06 -0500 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AEBAA2F19; Tue, 7 Mar 2023 09:31:11 -0800 (PST) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 327HUvWm101754; Tue, 7 Mar 2023 11:30:57 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678210257; bh=PKKOuaAa2gBguzQqapfZCABAxRkqv+t5CDo+WBJoBjM=; h=From:To:CC:Subject:Date; b=zDZ9PuGLZPOFMiqNXMvMrzkgGj5NXrOciLjfMxye4K1tDBmaxTq7ZTw1fvdRoV6SX 3sbi+zv1ELZ2RFjris/q6URurCkKW50BsfItYs7K0IPY8RWoZJAEldPJmg/LdTy936 5RTG+Mz8mvP4wCpdY6YVxKfn7yBGgW3Bkre3ANNU= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 327HUvRM094402 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 Mar 2023 11:30:57 -0600 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 7 Mar 2023 11:30:56 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 7 Mar 2023 11:30:56 -0600 Received: from ula0226330.dal.design.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 327HUuU9045064; Tue, 7 Mar 2023 11:30:56 -0600 From: Andrew Davis To: Wolfram Sang , Bartosz Golaszewski CC: , , , Andrew Davis Subject: [PATCH 1/3] i2c: davinci: Use platform table macro over module_alias Date: Tue, 7 Mar 2023 11:30:54 -0600 Message-ID: <20230307173056.30164-1-afd@ti.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759731403307237227?= X-GMAIL-MSGID: =?utf-8?q?1759731403307237227?= Generates the same platform module alias. More standard usage. Signed-off-by: Andrew Davis --- drivers/i2c/busses/i2c-davinci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index c836cf884185..abea1d86035c 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -943,12 +943,16 @@ static const struct dev_pm_ops davinci_i2c_pm = { #define davinci_i2c_pm_ops NULL #endif -/* work with hotplug and coldplug */ -MODULE_ALIAS("platform:i2c_davinci"); +static const struct platform_device_id davinci_i2c_driver_ids[] = { + { .name = "i2c_davinci", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(platform, davinci_i2c_driver_ids); static struct platform_driver davinci_i2c_driver = { .probe = davinci_i2c_probe, .remove = davinci_i2c_remove, + .id_table = davinci_i2c_driver_ids, .driver = { .name = "i2c_davinci", .pm = davinci_i2c_pm_ops, From patchwork Tue Mar 7 17:30:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 65757 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2572656wrd; Tue, 7 Mar 2023 09:55:30 -0800 (PST) X-Google-Smtp-Source: AK7set8og3J+ds1JLdtAIkcYo1A0JOt0DETwOIAX9wgaANuyMGr+L23UPuwECLQSqzLT9ue3AlVT X-Received: by 2002:a17:906:a248:b0:8b1:94cc:4a6b with SMTP id bi8-20020a170906a24800b008b194cc4a6bmr16270283ejb.37.1678211730287; Tue, 07 Mar 2023 09:55:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678211730; cv=none; d=google.com; s=arc-20160816; b=QSnvaE+J20KD7hWHvkSeJj8q+giMGloz+XBY8bOy1kVCDeNKH+Itev1T+aCKNyTD2l buoiULbR5PC/NVgokif/ipePlTIfRXyG+P8agDg6i6DyA44jNkZjTGazSgC6Jjbou+4Q KkPnZNqH4nKTfjdcSTBA+XkLsSsbwdbP4fJLnQ86YTVhKgEPId518PopXGc/hwOv1BbV rgoSeYr2qhFrwkQ1rZvKgTMCI6QwEDRILHIZOGAqOoe640ZF1+3rWWGv8nhFQVRbBU6x k8uBzN0cNRrSt1+rkcOuf2NmSsfHVOaGEpsfkxOmulcpt0MY+tHai96uPmxRZXethvQo yryg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6fCjEtwtv/IPhK41kwFaKhQDIWfKphfj41b1psqgSS4=; b=VeLPQEwBjLOc1WHkG14/lp8BdOB+Ynf0que0NbN8DyUyA9u/KxVY+Zon6bQawsLRIz KF9O3UGL55IdeQnp2NoQnjrUoB3NivYnsYeict/RMdI8N9aeb7KLYES+bOt9QX++9yAR mgeZ/slsj6LH/uuBGY3FDWAAuhM0TqC0HacAEkDm816XFEWlFC9HmZHJdkFnOmLXzRmF r8aORvJ+4pfYUVi3BkSyL669PTQTImzmR7dH24Dn9ZKC3YUfaaTP/7KMsO5eQAMCenDE kQZ/awEC8GPz9y3ZQL6QukcXmlQjSSVsw+BhsPe+QIbUaYcwytPLsQ4JaEaInUS45cSH HSlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rS9gqOBF; 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=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x8-20020a170906b08800b008eb6f52bf12si9514486ejy.112.2023.03.07.09.55.06; Tue, 07 Mar 2023 09:55:30 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b=rS9gqOBF; 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=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231453AbjCGRf0 (ORCPT + 99 others); Tue, 7 Mar 2023 12:35:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231887AbjCGRfE (ORCPT ); Tue, 7 Mar 2023 12:35:04 -0500 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E461A2F1F; Tue, 7 Mar 2023 09:31:08 -0800 (PST) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 327HUvcG042899; Tue, 7 Mar 2023 11:30:57 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678210257; bh=6fCjEtwtv/IPhK41kwFaKhQDIWfKphfj41b1psqgSS4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rS9gqOBFX2bgl+o3MSa2d4TrjjkfntbVY2MopaF25Tq10Om0L4+/q70zUgGWzFPid FIBVHI7kvMWVPFnXQCbjah9Cn24HzRPA0Z3fu3kKhQMriUWLYe7f+2HvB8PBsRES3W HRqWuAt4RprTk7chx/32wjc8bQrQRomy+J2aVvDE= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 327HUv2v049933 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 Mar 2023 11:30:57 -0600 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 7 Mar 2023 11:30:56 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 7 Mar 2023 11:30:56 -0600 Received: from ula0226330.dal.design.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 327HUuUA045064; Tue, 7 Mar 2023 11:30:56 -0600 From: Andrew Davis To: Wolfram Sang , Bartosz Golaszewski CC: , , , Andrew Davis Subject: [PATCH 2/3] i2c: davinci: Use struct name not type with devm_kzalloc() Date: Tue, 7 Mar 2023 11:30:55 -0600 Message-ID: <20230307173056.30164-2-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307173056.30164-1-afd@ti.com> References: <20230307173056.30164-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759732543078628357?= X-GMAIL-MSGID: =?utf-8?q?1759732543078628357?= This reduces chance of error if the type of "dev" changes. While here remove extra error print out, this is not usually done for memory allocation failures. Signed-off-by: Andrew Davis --- drivers/i2c/busses/i2c-davinci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index abea1d86035c..4a8e7728ee29 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -770,12 +770,9 @@ static int davinci_i2c_probe(struct platform_device *pdev) return dev_err_probe(&pdev->dev, irq, "can't get irq resource\n"); } - dev = devm_kzalloc(&pdev->dev, sizeof(struct davinci_i2c_dev), - GFP_KERNEL); - if (!dev) { - dev_err(&pdev->dev, "Memory allocation failed\n"); + dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); + if (!dev) return -ENOMEM; - } init_completion(&dev->cmd_complete); From patchwork Tue Mar 7 17:30:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 65755 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2572139wrd; Tue, 7 Mar 2023 09:54:29 -0800 (PST) X-Google-Smtp-Source: AK7set8CZfxOzQcySPdb/DqojyDanGqLBedFaJ/fitKi+9jLgOgOCJB6LKoRZKuHE9LjIVAHBjjX X-Received: by 2002:a17:907:3f81:b0:8e5:dfa3:ab06 with SMTP id hr1-20020a1709073f8100b008e5dfa3ab06mr19771902ejc.14.1678211669269; Tue, 07 Mar 2023 09:54:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678211669; cv=none; d=google.com; s=arc-20160816; b=Kdb5VQ9HlXtW3PZ+2C3H8fs2Jb1G/SRL+QSPvfoI3wCG3m1mPc4VJ5d2oFLwe4niBo JxQpFvcti+FgBvQ9Y+6lEhQxGfInSgJKaP19IZ9CbBCDfgTlxrvekCiV0zkUKjjv54RE 7AwdIh9vOvZjpF3yaLTjAEC2CChjOCq/SXXWN58z8MdVI138ICMHMyqF6pZz8CVpY+j1 Cjhu3K1Mc/2nwp6wV8gfWaKVdjFmdO2IzreI0xP0PACdy08hezt/lgkhg/0h4U/2vbmC IngYdNPYBDMJRZ6/YRzv/i4WSTctKVpkTn9HF4dz2nn3SoSkNsNXgNAXVxDueSqy5kOf EsOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ps8FiHY1KWT4BUFmpIbJrNMt544kBMXkEtn2e1pvBwY=; b=s5rTsPB3dxL1dIShnKjSX2NGSGMk+MH2LqRVa3paqz34MJ7Yyzv3Ap938TzV88S+8l NvoG4qFrEhxj+SRpj3Jo8bCVY+ISWVX6Do6yP1J+82NkMc+a3stgVVDc2p/XkVSDcu0y GF/q7zQp5KxyuFuOtugc/iqhqRUSrPJiwBUfHNgSbC0yoSXJn9cOKvkffl36zdspTD9N FutVXT2TqUoFeNRbezdV4DvHF247ZSuQe1juwJge8RyLjoGB9k7c3HBioQJ87rF84+au eRq6v26cqzjx6GI6LgszWunwKD4hmBS4WxQPwsu+lRwNgcqXqL62qr+yhMBRIA5/IIre kkyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=UJ+ApJhC; 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=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my36-20020a1709065a6400b008d6ae2337c4si6769735ejc.128.2023.03.07.09.54.05; Tue, 07 Mar 2023 09:54:29 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b=UJ+ApJhC; 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=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231809AbjCGRfX (ORCPT + 99 others); Tue, 7 Mar 2023 12:35:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbjCGRfE (ORCPT ); Tue, 7 Mar 2023 12:35:04 -0500 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62661A2F1E; Tue, 7 Mar 2023 09:31:08 -0800 (PST) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 327HUvK4004926; Tue, 7 Mar 2023 11:30:57 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1678210257; bh=Ps8FiHY1KWT4BUFmpIbJrNMt544kBMXkEtn2e1pvBwY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=UJ+ApJhCfdg0NNpxpd/ePso6l2Do5SaJk+BrkVjhONx9etsQDQ7CjaC+WrQS/lUQp uD+Er61KWS3SSu4kjAqIKs8KfvvHEnxeHIbUXIEV+W4GoX0ZP3Ps6eQ4dBDPFAkCFI rYiihiUFmPUUQ6QwFqcJsFXKEdT/4dv7VkjFkI0Y= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 327HUvLS094405 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 Mar 2023 11:30:57 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 7 Mar 2023 11:30:56 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 7 Mar 2023 11:30:56 -0600 Received: from ula0226330.dal.design.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 327HUuUB045064; Tue, 7 Mar 2023 11:30:56 -0600 From: Andrew Davis To: Wolfram Sang , Bartosz Golaszewski CC: , , , Andrew Davis Subject: [PATCH 3/3] i2c: davinci: Do not check for IRQ number 0 Date: Tue, 7 Mar 2023 11:30:56 -0600 Message-ID: <20230307173056.30164-3-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307173056.30164-1-afd@ti.com> References: <20230307173056.30164-1-afd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759732479158147069?= X-GMAIL-MSGID: =?utf-8?q?1759732479158147069?= This is not a valid IRQ number and will not be returned, no need to check for this. Signed-off-by: Andrew Davis --- drivers/i2c/busses/i2c-davinci.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 4a8e7728ee29..135f76593e6f 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -764,11 +764,8 @@ static int davinci_i2c_probe(struct platform_device *pdev) int r, irq; irq = platform_get_irq(pdev, 0); - if (irq <= 0) { - if (!irq) - irq = -ENXIO; + if (irq < 0) return dev_err_probe(&pdev->dev, irq, "can't get irq resource\n"); - } dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); if (!dev)