From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC1E81A38F0 for ; Thu, 29 Aug 2024 13:13:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724937209; cv=none; b=ZUQl+MaOOwNVpzhB2dIsXoZfdRjoi4nOnieEeehKDCnRP7aX+2iNwupgwcLdYiU0em8emd0oSwcFivduU3ESMAa6jLaaBojKOdJJZHZ78hT+H3yuUIeuhvgwDmBVeDMZiGNvrPV40yrjmk+EJAbfXBiFAJ6rCnLgfqe0T6x9ZWw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724937209; c=relaxed/simple; bh=qnYIj6qokB7Iw7VUBkmFypMZWVgIcjZrwzkwlqFBP9c=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YfDvLnqtwY+U/Q0tdRDflh2xeWQCED5ppwXgLqce+3b72yqx4l7+Tx3HQpxguA2iMQaJsVMW+OsLmprQig8hDXCkmJ4zRWogXjA6S4Yar29ctJiwk9+Y/FDw09YsLi+axRnnezxZxx7A3syEz2vMEwKp53pJgnQyx6X/hMm6AXI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=bOq3mxti; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="bOq3mxti" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-533521cd1c3so754131e87.1 for ; Thu, 29 Aug 2024 06:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1724937206; x=1725542006; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=zcevrydr3wb+wZ7r5tLJWsjj7JW9bLBAqf2EeUSSlJQ=; b=bOq3mxtiP/KD5pf247A1dz5lzzRSKFBAyidvd0+TklXn+fMV3qlpgNe1xLhsvgyeLG 2mjCCOhmITe0B1ZnBiGD6BFqfSFe5cyZIjxXexfICVR85AELhHnbNZ3qbxhq8U96iUY0 Jl/NC9ck0azR8T/UKP10IsMFOCky37/Cyj8VgTiqzY5rknMVuM8AYGbToOHdYRW6G/ke zuSbnwmLsD4kk1HjqVc5MQQbW33UbNNqpQOFBOIwgac+qIwjbs2ZRyz436iRQG1Weuaj d+6BZ+dRyYY7/48p6AVNgFvybtNhBWzH58C8th7dQbndZZcGiNXoO4rAtMJGM+E29Hrm yESQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724937206; x=1725542006; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zcevrydr3wb+wZ7r5tLJWsjj7JW9bLBAqf2EeUSSlJQ=; b=U/vC63SIDhhyV/9zy/lOgfxsHaalFfOtwVJflRb63sGh6w5W9bl6C6XEGVDb4pLsiF y1YqO7CZpaU41GWPzXE/VzRuSvN5W0Ql7135JHHEb1vMLZBL4xBZmNSL2owxK4NNuXMa TK+bfxcrnWzJdNOJt9cN0bRSxc4tP4eniyAWef0Wg9hHEd/Us804i/vvKFUyZYU23Icb jf7IbVWUfWqVXfxf0VwEJhnb+SErpjia9qB9W3P+wl7b8+8TzwYpd07+YSxoXynyBU/6 9PNdvRcelpakpNKNNBAsh5PU/Sm9DvWDzCscIG98Cw/qw6cPzq/JCMvLdv+9QmBX5qso IMEw== X-Forwarded-Encrypted: i=1; AJvYcCUL9fmPW9e2+XHTlxHlfKEvupKlIX/GnPtjYjRE1FJr9DwN6456sgsLJxA87C45ZXq5Y88vC4qxf0gY@vger.kernel.org X-Gm-Message-State: AOJu0YwOBwISmgj4oZcJmbGyE9KaBlZQlxOGc0Eb00A1iBMtNTK7q0zG 36xJT0koP9S8VbAPF8p9Lq3f89BjALZ3QItcpITr8yP80FA5lRJIdEzzCX3G+rU= X-Google-Smtp-Source: AGHT+IFLMk4m6y7fSkfLg3A3IXASRJuXYrAbPU9+Ww0KPnYO42UsA+Qqa5Bo9AeJfKaUmIGFU/dvxw== X-Received: by 2002:a05:6512:3b9e:b0:52c:cd77:fe03 with SMTP id 2adb3069b0e04-5353e54d499mr2408631e87.14.1724937205212; Thu, 29 Aug 2024 06:13:25 -0700 (PDT) Received: from localhost (host-80-182-198-72.pool80182.interbusiness.it. [80.182.198.72]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c226ce4f5dsm697741a12.89.2024.08.29.06.13.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 06:13:24 -0700 (PDT) From: Andrea della Porta X-Google-Original-From: Andrea della Porta Date: Thu, 29 Aug 2024 15:13:31 +0200 To: Andrew Lunn Cc: Krzysztof Kozlowski , Andrea della Porta , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Linus Walleij , Catalin Marinas , Will Deacon , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nicolas Ferre , Claudiu Beznea , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Saravana Kannan , Bjorn Helgaas , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, Lee Jones , Stefan Wahren Subject: Re: [PATCH 00/11] Add support for RaspberryPi RP1 PCI device using a DT overlay Message-ID: Mail-Followup-To: Andrew Lunn , Krzysztof Kozlowski , Andrea della Porta , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Linus Walleij , Catalin Marinas , Will Deacon , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nicolas Ferre , Claudiu Beznea , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Saravana Kannan , Bjorn Helgaas , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, Lee Jones , Stefan Wahren References: <14990d25-40a2-46c0-bf94-25800f379a30@kernel.org> <45a41ed9-2e42-4fd5-a1d5-35de93ce0512@lunn.ch> Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Andrew, On 15:04 Thu 29 Aug , Andrew Lunn wrote: > > > > WARNING: externs should be avoided in .c files > > > > #331: FILE: drivers/misc/rp1/rp1-pci.c:58: > > > > +extern char __dtbo_rp1_pci_begin[]; > > > > > > > > True, but in this case we don't have a symbol that should be exported to other > > > > translation units, it just needs to be referenced inside the driver and > > > > consumed locally. Hence it would be better to place the extern in .c file. > > > > > > Did you try making it static. > > > > The dtso is compiled into an obj and linked with the driver which is in > > a different transaltion unit. I'm not aware on other ways to include that > > symbol without declaring it extern (the exception being some hackery > > trick that compile the dtso into a .c file to be included into the driver > > main source file). > > Or probably I'm not seeing what you are proposing, could you please elaborate > > on that? > > Sorry, i jumped to the wrong conclusion. Often it is missing static > keyword which causes warnings. However, you say it needs to be global > scope. > > Reading the warning again: > > > > > WARNING: externs should be avoided in .c files > > It is wanting you to put it in a .h file, which then gets > included by the two users. Ah I see now what you were referring to, thanks. I'll put the extern into an header file, although there are no two users of that, the only one being rp1-pci.c. Many thanks, Andrea > > Andrew 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BEA64C83F16 for ; Thu, 29 Aug 2024 13:15:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Type:MIME-Version:References:Message-ID:Subject:To:Date:From:Reply-To :Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zcevrydr3wb+wZ7r5tLJWsjj7JW9bLBAqf2EeUSSlJQ=; b=eO2bqH2Jfx/88RssMvChagQqU0 N/4CmPo67O9pmmlwJH+29k4Gi1ClVGrl2LeqZ1gh9x93c4jqRTmuTG1cjHHisTcARRib1zOw2jrbh 7m8hXahwiAWl0HcauXsYHMuH/XdwaEzXRJHKpIn/pacCsoRt3ou4MXOZeE0KRsEIZwa2tMX6rTcZP TFkoGvVcMCZdmyCpFzfhPm2YjR2+AM2MTVYIrybygQgNwcIR+4mOIKKBbokXny3k2TEjZXy2/IcJI BJo3fC/D1DZVOhRjpx5+kdcZu7EXDR4k5RBPYwJV9mqdvAY+ak6oH+AJ5cF2iH1V2Jrrg1UUPZQG9 /9nGGJAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjezo-000000026wH-1vWF; Thu, 29 Aug 2024 13:15:28 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjexr-000000026Ml-3MaQ for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 13:13:29 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5343617fdddso1156881e87.0 for ; Thu, 29 Aug 2024 06:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1724937206; x=1725542006; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=zcevrydr3wb+wZ7r5tLJWsjj7JW9bLBAqf2EeUSSlJQ=; b=XC6AdLtS+vFCSKbmTntV5+otJqrqeX1M97+E09JKiFmBmOCPJNbCYyi/RwBBdHUdzg pfIHkPcSSQdULt5PBpxqUuZXGmndem4y5ZydUaj5KxXal7wD5yLDaKz7WQcPW19GjR2E XL6SOz+OUVQFY0A4DaNVrnpUjOFNVRbzLYe+dtuRZj92YNGLORAmlI02zbkpMBNJeTPA YJwKpMZFa/a+oD6wbthZ9Yz4F/G8cGJUJhaYdW2JmJDXf5yCBT3k88EQGOTpgGQbFqzo fWTIfw24R1pUn9vkIo8l/nYrM2tvilkI9C2uZ2BhwJHh0hOVY2GVHFtI09RNfhFm7P+z TOmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724937206; x=1725542006; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zcevrydr3wb+wZ7r5tLJWsjj7JW9bLBAqf2EeUSSlJQ=; b=Dkn6ozmq6CFewpnOQOcvoKC4W3bT/h4D8yuG/dGpXnDtC7imt38y86aYTl70jgt2Qp BEUx00ykk6Aao8OCdjivf7mir4WmxfME3GmBAr7xKInB2wdsSydjYHczBi0KnJjIoj40 X+LnoysyEU5Xx/6FrzWj51ptH2Yecb2I8SLdx5ddqtc9KAnHRdlJzzt8oZkR38LoU4T5 0/Gl3LG6Qf0ISMCw2hDkxYwomT22fF20I99cP5lh146zSrDKhsG3xi0dlWlHDce53IVc cUF/Qp6hMpbAxcti9F+zJ9xAwNgaUSPGybyR/oT2vC9KHm/P9UZ5YMDvNpgK7YwZRbBa n79g== X-Forwarded-Encrypted: i=1; AJvYcCUxb97y51pKmsjxIKC+Nv2QMXQAoG0t/WTNsfwFjFY6YM9TVcgQUknODWccp/EQf2Xc7aZ+pp0x2FdejXcrrh1y@lists.infradead.org X-Gm-Message-State: AOJu0YxTm/fx5Q414dlglZFpaJmP1fgulPQ3jdFBS6+xWbuUzHMueZw3 yCpEJZiIZ6FpigAvyL4lg71XJ3JgI96XFIzZyIP32Gpq8D+CjjqUBIPYdXNvHps= X-Google-Smtp-Source: AGHT+IFLMk4m6y7fSkfLg3A3IXASRJuXYrAbPU9+Ww0KPnYO42UsA+Qqa5Bo9AeJfKaUmIGFU/dvxw== X-Received: by 2002:a05:6512:3b9e:b0:52c:cd77:fe03 with SMTP id 2adb3069b0e04-5353e54d499mr2408631e87.14.1724937205212; Thu, 29 Aug 2024 06:13:25 -0700 (PDT) Received: from localhost (host-80-182-198-72.pool80182.interbusiness.it. [80.182.198.72]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c226ce4f5dsm697741a12.89.2024.08.29.06.13.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 06:13:24 -0700 (PDT) From: Andrea della Porta X-Google-Original-From: Andrea della Porta Date: Thu, 29 Aug 2024 15:13:31 +0200 To: Andrew Lunn Subject: Re: [PATCH 00/11] Add support for RaspberryPi RP1 PCI device using a DT overlay Message-ID: Mail-Followup-To: Andrew Lunn , Krzysztof Kozlowski , Andrea della Porta , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Linus Walleij , Catalin Marinas , Will Deacon , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nicolas Ferre , Claudiu Beznea , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Saravana Kannan , Bjorn Helgaas , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, Lee Jones , Stefan Wahren References: <14990d25-40a2-46c0-bf94-25800f379a30@kernel.org> <45a41ed9-2e42-4fd5-a1d5-35de93ce0512@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_061327_898003_981022C6 X-CRM114-Status: GOOD ( 25.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Michael Turquette , Claudiu Beznea , Eric Dumazet , Dragan Cvetic , Will Deacon , linux-clk@vger.kernel.org, linux-arch@vger.kernel.org, Rob Herring , Florian Fainelli , Lee Jones , Krzysztof Kozlowski , Saravana Kannan , Broadcom internal kernel review list , linux-pci@vger.kernel.org, Jakub Kicinski , Paolo Abeni , Linus Walleij , devicetree@vger.kernel.org, Conor Dooley , Arnd Bergmann , linux-gpio@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Bjorn Helgaas , Andrea della Porta , linux-arm-kernel@lists.infradead.org, Derek Kiernan , Stephen Boyd , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Stefan Wahren , netdev@vger.kernel.org, Krzysztof Kozlowski , "David S. Miller" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Andrew, On 15:04 Thu 29 Aug , Andrew Lunn wrote: > > > > WARNING: externs should be avoided in .c files > > > > #331: FILE: drivers/misc/rp1/rp1-pci.c:58: > > > > +extern char __dtbo_rp1_pci_begin[]; > > > > > > > > True, but in this case we don't have a symbol that should be exported to other > > > > translation units, it just needs to be referenced inside the driver and > > > > consumed locally. Hence it would be better to place the extern in .c file. > > > > > > Did you try making it static. > > > > The dtso is compiled into an obj and linked with the driver which is in > > a different transaltion unit. I'm not aware on other ways to include that > > symbol without declaring it extern (the exception being some hackery > > trick that compile the dtso into a .c file to be included into the driver > > main source file). > > Or probably I'm not seeing what you are proposing, could you please elaborate > > on that? > > Sorry, i jumped to the wrong conclusion. Often it is missing static > keyword which causes warnings. However, you say it needs to be global > scope. > > Reading the warning again: > > > > > WARNING: externs should be avoided in .c files > > It is wanting you to put it in a .h file, which then gets > included by the two users. Ah I see now what you were referring to, thanks. I'll put the extern into an header file, although there are no two users of that, the only one being rp1-pci.c. Many thanks, Andrea > > Andrew