From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Shraddha Barke <shraddha.6596@gmail.com>,
outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] Staging: android: Remove unneeded definition in header file
Date: Thu, 1 Oct 2015 11:44:00 +0530 [thread overview]
Message-ID: <20151001061400.GA21892@sudip-pc> (raw)
In-Reply-To: <20151001055624.GA25101@kroah.com>
On Thu, Oct 01, 2015 at 07:56:24AM +0200, Greg KH wrote:
> On Thu, Oct 01, 2015 at 09:49:26AM +0530, Shraddha Barke wrote:
> > These struct are globally defined in source file but they have been
> > defined as static in .h file. Remove definition in header file as
> > it is not needed. Also fix the compiler warning.
> >
> > Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
> > ---
> > drivers/staging/android/sw_sync.h | 15 ---------------
> > 1 file changed, 15 deletions(-)
> >
> > diff --git a/drivers/staging/android/sw_sync.h b/drivers/staging/android/sw_sync.h
> > index c87ae9e..a671595 100644
> > --- a/drivers/staging/android/sw_sync.h
> > +++ b/drivers/staging/android/sw_sync.h
> > @@ -39,21 +39,6 @@ struct sw_sync_timeline *sw_sync_timeline_create(const char *name);
> > void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc);
> >
> > struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value);
> > -#else
> > -static inline struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
> > -{
> > - return NULL;
> > -}
> > -
> > -static inline void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)
> > -{
> > -}
> > -
> > -static inline struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj,
> > - u32 value)
> > -{
> > - return NULL;
> > -}
> > #endif /* IS_ENABLED(CONFIG_SW_SYNC) */
> >
> > #endif /* _LINUX_SW_SYNC_H */
>
> You just broke the build for systems that don't define CONFIG_SW_SYNC
> yet still call these functions :(
I had the same doubt so i tested it with CONFIG_SW_SYNC disabled in my
.config, but the build didn't break.
Is it because the only use of sw_sync_timeline_inc is from sw_sync.c
which will build only if CONFIG_SW_SYNC is defined?
regards
sudip
next prev parent reply other threads:[~2015-10-01 6:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 4:19 [PATCH] Staging: android: Remove unneeded definition in header file Shraddha Barke
2015-10-01 5:56 ` [Outreachy kernel] " Greg KH
2015-10-01 6:14 ` Sudip Mukherjee [this message]
2015-10-01 8:00 ` Greg KH
2015-10-01 8:04 ` Julia Lawall
2015-10-01 8:18 ` Greg KH
2015-10-01 8:11 ` Shraddha Barke
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=20151001061400.GA21892@sudip-pc \
--to=sudipm.mukherjee@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=shraddha.6596@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.