From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8B73C2BBD5 for ; Fri, 18 Dec 2020 14:21:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B07F723AAA for ; Fri, 18 Dec 2020 14:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727919AbgLROVL (ORCPT ); Fri, 18 Dec 2020 09:21:11 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37710 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727108AbgLROVK (ORCPT ); Fri, 18 Dec 2020 09:21:10 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0BIEJQJC093197; Fri, 18 Dec 2020 08:19:26 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1608301166; bh=S+0GamKVCQ687Tv6EqyRvpQ1fBcSrBgLoRk//UMEKCc=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=OhInuthfyE1sUT8QW2eEhRFjnbAPn+XfqGsUV4TRoOxjVnbfsDsvCcSie1YV4266F 8/RGvWMmDTkhyLbGDvbXCCq2Lny1atTCTREMQH03bwULQo68I86n48w5a1mGsKnPFE ZUs2go+hyKlixjJWH7kN4clMEnqDp82uw8nSOeuw= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0BIEJQSm095816 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 18 Dec 2020 08:19:26 -0600 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 18 Dec 2020 08:19:26 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 18 Dec 2020 08:19:26 -0600 Received: from [10.24.69.20] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0BIEJNTE090472; Fri, 18 Dec 2020 08:19:23 -0600 Subject: Re: [PATCH] msi: use for_each_msi_entry_safe iterator macro To: Jacob Keller , , CC: "Rafael J . Wysocki" , Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , Santosh Shilimkar , Miquel Raynal References: <20201217005557.45031-1-jacob.e.keller@intel.com> From: Lokesh Vutla Message-ID: <4b3ee539-d5b0-d316-5ee0-0b7bd543c283@ti.com> Date: Fri, 18 Dec 2020 19:49:22 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20201217005557.45031-1-jacob.e.keller@intel.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/12/20 6:25 am, Jacob Keller wrote: > Commit 81b1e6e6a859 ("platform-msi: Free descriptors in > platform_msi_domain_free()") introduced for_each_msi_entry_safe as an > iterator operating on the msi_list using the safe semantics with > a temporary variable. > > A handful of locations still used the generic iterator instead of the > specific macro. Fix the 3 remaining cases. Add a cocci script which can > detect and report any misuse that is introduced in future changes. > > Cc: Rafael J. Wysocki > Cc: Stuart Yoder > Cc: Laurentiu Tudor > Cc: Nishanth Menon > Cc: Tero Kristo > Cc: Santosh Shilimkar > Cc: Miquel Raynal > Signed-off-by: Jacob Keller > --- [..snip..] > } > diff --git a/drivers/soc/ti/ti_sci_inta_msi.c b/drivers/soc/ti/ti_sci_inta_msi.c > index 0eb9462f609e..66f9772dcdfa 100644 > --- a/drivers/soc/ti/ti_sci_inta_msi.c > +++ b/drivers/soc/ti/ti_sci_inta_msi.c > @@ -64,7 +64,7 @@ static void ti_sci_inta_msi_free_descs(struct device *dev) > { > struct msi_desc *desc, *tmp; > > - list_for_each_entry_safe(desc, tmp, dev_to_msi_list(dev), list) { > + for_each_msi_entry_safe(desc, tmp, dev) { > list_del(&desc->list); > free_msi_entry(desc); > } For ti_sci_inta_msi part: Reviewed-by: Lokesh Vutla Thanks and regards, Lokesh