From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: arnd@arndb.de, mathieu.poirier@linaro.org,
alexander.shishkin@linux.intel.com
Cc: ndesaulniers@google.com, gregkh@linuxfoundation.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coresight: catu: fix clang build warning
Date: Thu, 7 Mar 2019 10:48:23 +0000 [thread overview]
Message-ID: <b32ab22a-2513-29b9-c000-d698f4efcb90@arm.com> (raw)
In-Reply-To: <20190307103309.1574563-1-arnd@arndb.de>
Hi Arnd,
On 07/03/2019 10:32, Arnd Bergmann wrote:
> Clang points out a syntax error, as the etr_catu_buf_ops structure is
> declared 'static' before the type is known:
>
> In file included from drivers/hwtracing/coresight/coresight-tmc-etr.c:12:
> drivers/hwtracing/coresight/coresight-catu.h:116:40: warning: tentative definition of variable with internal linkage has incomplete non-array type 'const struct etr_buf_operations' [-Wtentative-definition-incomplete-type]
> static const struct etr_buf_operations etr_catu_buf_ops;
> ^
> drivers/hwtracing/coresight/coresight-catu.h:116:21: note: forward declaration of 'struct etr_buf_operations'
> static const struct etr_buf_operations etr_catu_buf_ops;
>
> This seems worth fixing in the code, so replace pointer to the empty
> constant structure with a NULL pointer. We need an extra NULL pointer
> check here, but the result should be better object code otherwise,
> avoiding the silly empty structure.
>
> Fixes: 434d611cddef ("coresight: catu: Plug in CATU as a backend for ETR buffer")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks for the fix.
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
next prev parent reply other threads:[~2019-03-07 10:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-07 10:32 Arnd Bergmann
2019-03-07 10:48 ` Suzuki K Poulose [this message]
2019-03-07 17:24 ` Mathieu Poirier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b32ab22a-2513-29b9-c000-d698f4efcb90@arm.com \
--to=suzuki.poulose@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=ndesaulniers@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®