Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2134099pxu; Fri, 18 Dec 2020 06:23:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbzh6KVazGbjlPU5dfryR8mZsmPtLm4yr7E3GqdzTQHYYXDAj13TPX23pEF6zwDr+rKOAQ X-Received: by 2002:a05:6402:3074:: with SMTP id bs20mr4593217edb.365.1608301395478; Fri, 18 Dec 2020 06:23:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608301395; cv=none; d=google.com; s=arc-20160816; b=BxNUgJ7uaV+kzYxEdsdWUuc48WhhvCpj9+LC+s36InG0kQvm63zfMussLzhldR2Ris Joe1vYzfAVPswxSFb8pU3uj9Tk55bvmbnCg79GcCZwurSJOL9glQPU7YDtFxezWzAp7G omvL14uRSmLp7pgW/xM3kMJ/ObkkYBlHgsGsQKns0ldu5tmZO8FjBxNX+TczjVynFO4G UOCiZYlYTDmWh3q1CGMkU3ShbVWvRxxrlz31sOx4l2P+5qR2OnsoT4INN7cN7oNj7CYM +9H3/uUoueVnJDrO5HUEiTZJwg0pxlGH96FbemdGfgSb4gM2NF8dO/DMMvfT1RCkhX0G b4Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=S+0GamKVCQ687Tv6EqyRvpQ1fBcSrBgLoRk//UMEKCc=; b=VydPYLG70u7DRagm00etEWETOwu0zZoPmDAhJ+V+nagS7hQEwx1GXmc0J6joiy8hy9 b7PJn/QI4pk+W66Kpw9TJgT6dZwESAN87EI2Xb9ctJjCg5yBC1dAyUL9IhKUMa45FWf4 zweLkeBUzVukE8qUzQl4p82uFg67Opr4JVSiIFxZzp4K4it23jgwHZQpy8NS9FyX2ZRs a8Mr86qo+5w0oTPeTKi5LgwRwKLk4ctYfIoZtN5T8VZOr7/P90hXsGjhw6I+H+oNmcat iB/7zutRT2aRtYMiB3Enows7MtiQtAYuuYcJsBtdZe7JJWi4ZXox5N7nGacH86/1T5m2 RVGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OhInuthf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si6602218edv.195.2020.12.18.06.22.53; Fri, 18 Dec 2020 06:23:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OhInuthf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727079AbgLROVK (ORCPT + 99 others); Fri, 18 Dec 2020 09:21:10 -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