Message ID | 8a18223a184901971137954903ad59bd152d0d47.1637573097.git.mchehab+huawei@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Address some clang W=1 warnings | expand |
Hi Mauro, Thank you for the patch. On Mon, Nov 22, 2021 at 09:26:07AM +0000, Mauro Carvalho Chehab wrote: > The gobj_type() function translates the media object type into > a name, being useful for debugging purposes. It is currently > not used, but let's keep it around, as it can be useful. Don't we usually remove dead code, and add it back later when and if needed, unless we know the code will be used in the near future ? I don't care too much either way. > So, mark it with __maybe_unused, in order to shut up a > clang warning. > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> > --- > > To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. > See [PATCH 00/10] at: https://lore.kernel.org/all/cover.1637573097.git.mchehab+huawei@kernel.org/ > > drivers/media/mc/mc-entity.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/mc/mc-entity.c b/drivers/media/mc/mc-entity.c > index f40f41977142..b0ea145ac9c0 100644 > --- a/drivers/media/mc/mc-entity.c > +++ b/drivers/media/mc/mc-entity.c > @@ -14,7 +14,7 @@ > #include <media/media-entity.h> > #include <media/media-device.h> > > -static inline const char *gobj_type(enum media_gobj_type type) > +static inline __maybe_unused const char *gobj_type(enum media_gobj_type type) > { > switch (type) { > case MEDIA_GRAPH_ENTITY:
diff --git a/drivers/media/mc/mc-entity.c b/drivers/media/mc/mc-entity.c index f40f41977142..b0ea145ac9c0 100644 --- a/drivers/media/mc/mc-entity.c +++ b/drivers/media/mc/mc-entity.c @@ -14,7 +14,7 @@ #include <media/media-entity.h> #include <media/media-device.h> -static inline const char *gobj_type(enum media_gobj_type type) +static inline __maybe_unused const char *gobj_type(enum media_gobj_type type) { switch (type) { case MEDIA_GRAPH_ENTITY:
The gobj_type() function translates the media object type into a name, being useful for debugging purposes. It is currently not used, but let's keep it around, as it can be useful. So, mark it with __maybe_unused, in order to shut up a clang warning. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 00/10] at: https://lore.kernel.org/all/cover.1637573097.git.mchehab+huawei@kernel.org/ drivers/media/mc/mc-entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)