Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp17539pxx; Wed, 28 Oct 2020 16:44:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAUlcM3elCtP5WOTNitkU5tBWrfA9AV1P7gc7BmTxcX5UYVRXmKtEOZ+A1DtaVgQjvDwUq X-Received: by 2002:a50:d987:: with SMTP id w7mr1341604edj.113.1603928660859; Wed, 28 Oct 2020 16:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603928660; cv=none; d=google.com; s=arc-20160816; b=oAjz97+B8eJmibk9c2NyadnUSz+VXBIpxma4QuO8/fK2/pCMe4bKfGI5YJVcJt5IIK sdrvZhTT0MWeQHb0xj8rF/8zKx9hC3hzKz7zOfgkaA42JoHhSGbM/6c+hn+KmeFhT3UB NxJ9EF61NdEXQg5yfFRtGCrlaChXyje6C06FSrQmqTrXWjk6Ui4Yn4UG2VdIXjfjmH7s vFxjIxVuHtTnQyArq5NlFgy1NjMyNWmL6cOrJEdR2mlIXeAePP3Fi9lkkErdKvEN5MIw 5/M3TT5QwWRA5XHUsf9D2RFNgHgIm2akie42MiD96hkdb6g0JRQcJGkb4PRlC89u9Rxh 7e1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=yJy6fDD0kL6NmmEPPkspkAa4uepbET8HYzXlPI57VdA=; b=RcOgdqWXi8VwYxP/fQz6q2sw7jwyzJPooZQsC6h+JWKI51Qnrz2t9JbjNo7KqWl/wP vf3mjceFBO4jSA+9/LmySWQeXDzxHiCtLbvnhSeFREkhJNd9pvgrM7W4OYtwd8y+JHYp DFJpHvWYFzGHymtJmrBhyr4nlh6dNo1csd6MmSsPXpeNSyEutvDLPxhtHyP4ghBeCvb3 c/6WRLNVvgpJENj2ajZkTdvrqbPkxQHDdSkhJjKlAsvAVAuvKA1/LjetPuVg6yxd1QQz iMNJMIx0lmuz/pxVIUnze/wblSc2JsPrqpWY+hU5QGlnbves7zKJNLfnGmKKHqUxcbx1 oGeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Rvy2470g; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g19si616957ejh.138.2020.10.28.16.43.59; Wed, 28 Oct 2020 16:44:20 -0700 (PDT) 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=@kernel.org header.s=default header.b=Rvy2470g; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390521AbgJ1XfA (ORCPT + 99 others); Wed, 28 Oct 2020 19:35:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:52234 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390490AbgJ1Xew (ORCPT ); Wed, 28 Oct 2020 19:34:52 -0400 Received: from kernel.org (unknown [104.132.1.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DB478207CD; Wed, 28 Oct 2020 23:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603928092; bh=SkQS+kWFiHlNP9A0NCZXUnj0zgMwNgitxpz4kbLJEAU=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=Rvy2470gXdjhUuqsTnms1+9zn/3ltbcoGLut4tp8macFajRCZ/q11mXsb5MRbetJp x474Lxd6mDACqBiPmcl6Pl2Z9pr+557S2YUM1eKDOW49Qd2isIpjJEW+1NiCny6JNr AsHQgnPP4ZzPTqOL4kaUc4Y5a2EChaeY9L0PdUzg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20201026161411.3708639-1-arnd@kernel.org> References: <20201026161411.3708639-1-arnd@kernel.org> Subject: Re: [PATCH] clk: define to_clk_regmap() as inline function From: Stephen Boyd Cc: Arnd Bergmann , Stephen Boyd , Martin Blumenstingl , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org To: Andy Gross , Arnd Bergmann , Bjorn Andersson , Jerome Brunet , Kevin Hilman , Michael Turquette , Mike Turquette , Neil Armstrong Date: Wed, 28 Oct 2020 16:34:50 -0700 Message-ID: <160392809056.884498.15602398724017724347@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Arnd Bergmann (2020-10-26 09:13:57) > From: Arnd Bergmann >=20 > Nesting container_of() causes warnings with W=3D2, which is > annoying if it happens in headers and fills the build log > like: >=20 > In file included from drivers/clk/qcom/clk-alpha-pll.c:6: > drivers/clk/qcom/clk-alpha-pll.c: In function 'clk_alpha_pll_hwfsm_enable= ': > include/linux/kernel.h:852:8: warning: declaration of '__mptr' shadows a = previous local [-Wshadow] > 852 | void *__mptr =3D (void *)(ptr); \ > | ^~~~~~ > drivers/clk/qcom/clk-alpha-pll.c:155:31: note: in expansion of macro 'con= tainer_of' > 155 | #define to_clk_alpha_pll(_hw) container_of(to_clk_regmap(_hw), \ > | ^~~~~~~~~~~~ > drivers/clk/qcom/clk-regmap.h:27:28: note: in expansion of macro 'contain= er_of' > 27 | #define to_clk_regmap(_hw) container_of(_hw, struct clk_regmap, h= w) > | ^~~~~~~~~~~~ > drivers/clk/qcom/clk-alpha-pll.c:155:44: note: in expansion of macro 'to_= clk_regmap' > 155 | #define to_clk_alpha_pll(_hw) container_of(to_clk_regmap(_hw), \ > | ^~~~~~~~~~~~~ > drivers/clk/qcom/clk-alpha-pll.c:254:30: note: in expansion of macro 'to_= clk_alpha_pll' > 254 | struct clk_alpha_pll *pll =3D to_clk_alpha_pll(hw); > | ^~~~~~~~~~~~~~~~ > include/linux/kernel.h:852:8: note: shadowed declaration is here > 852 | void *__mptr =3D (void *)(ptr); \ > | ^~~~~~ >=20 > Redefine two copies of the to_clk_regmap() macro as inline functions > to avoid a lot of these. >=20 > Fixes: ea11dda9e091 ("clk: meson: add regmap clocks") > Fixes: 085d7a455444 ("clk: qcom: Add a regmap type clock struct") > Signed-off-by: Arnd Bergmann > --- Applied to clk-fixes