From: Greg KH <gregkh@suse.de>
To: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Cc: Mike Frysinger <vapier.adi@gmail.com>,
Julia Lawall <julia@diku.dk>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/28] drivers/base/platform.c: Drop return value from
Date: Wed, 17 Dec 2008 21:38:26 +0000 [thread overview]
Message-ID: <20081217213826.GD26923@suse.de> (raw)
In-Reply-To: <49424438.7030205@movial.fi>
On Fri, Dec 12, 2008 at 01:00:08PM +0200, Dmitri Vorobiev wrote:
> Greg KH wrote:
> > On Wed, Dec 10, 2008 at 05:37:42PM -0500, Mike Frysinger wrote:
> >> On Wed, Dec 10, 2008 at 17:18, Vorobiev Dmitri wrote:
> >>>> On Wed, Dec 10, 2008 at 11:26, Julia Lawall wrote:
> >>>>> The return value of the remove function of a driver structure, and thus
> >>>>> of
> >>>>> a platform_driver structure, is ultimately ignored, and is thus
> >>>>> unnecessary. The goal of this patch is to make it possible to convert
> >>>>> the
> >>>>> platform_driver functions stored in the remove field such that they
> >>>>> return
> >>>>> void. This patch introduces a temporary field remove_new with return
> >>>>> type
> >>>>> void into the platform_driver structure, and updates the only place that
> >>>>> the remove function is called to call the function in the remove_new
> >>>>> field,
> >>>>> if one is available. The subsequent patches update some drivers to use
> >>>>> the
> >>>>> remove_new field.
> >>>> why bother with remove -> remove_new convention ?
> >>> Please see this email for the background:
> >>>
> >>> http://lkml.org/lkml/2008/12/10/231
> >>>
> >>>> you'll get a
> >>>> warning in C about the assignment, but you wont get a build failure,
> >>> ...unless you compile with -Werror, which frequently the case.
> >> anyone crazy enough to build with -Werror is crazy enough to send in a fix ;)
> >
> > Hm, have you noted that some arches have that flag enabled in their
> > build?
> >
> > And it's not ok to add a couple of hundred build warnings to the system,
> > sorry.
>
> Still, what about the whole series? What do you think about int->void
> migration for the remove() callback?
In thinking about it some more, I don't really see the point. We should
probably just do something about the return value, as that would be
better, and easier to do.
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@suse.de>
To: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Cc: Mike Frysinger <vapier.adi@gmail.com>,
Julia Lawall <julia@diku.dk>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions
Date: Wed, 17 Dec 2008 13:38:26 -0800 [thread overview]
Message-ID: <20081217213826.GD26923@suse.de> (raw)
In-Reply-To: <49424438.7030205@movial.fi>
On Fri, Dec 12, 2008 at 01:00:08PM +0200, Dmitri Vorobiev wrote:
> Greg KH wrote:
> > On Wed, Dec 10, 2008 at 05:37:42PM -0500, Mike Frysinger wrote:
> >> On Wed, Dec 10, 2008 at 17:18, Vorobiev Dmitri wrote:
> >>>> On Wed, Dec 10, 2008 at 11:26, Julia Lawall wrote:
> >>>>> The return value of the remove function of a driver structure, and thus
> >>>>> of
> >>>>> a platform_driver structure, is ultimately ignored, and is thus
> >>>>> unnecessary. The goal of this patch is to make it possible to convert
> >>>>> the
> >>>>> platform_driver functions stored in the remove field such that they
> >>>>> return
> >>>>> void. This patch introduces a temporary field remove_new with return
> >>>>> type
> >>>>> void into the platform_driver structure, and updates the only place that
> >>>>> the remove function is called to call the function in the remove_new
> >>>>> field,
> >>>>> if one is available. The subsequent patches update some drivers to use
> >>>>> the
> >>>>> remove_new field.
> >>>> why bother with remove -> remove_new convention ?
> >>> Please see this email for the background:
> >>>
> >>> http://lkml.org/lkml/2008/12/10/231
> >>>
> >>>> you'll get a
> >>>> warning in C about the assignment, but you wont get a build failure,
> >>> ...unless you compile with -Werror, which frequently the case.
> >> anyone crazy enough to build with -Werror is crazy enough to send in a fix ;)
> >
> > Hm, have you noted that some arches have that flag enabled in their
> > build?
> >
> > And it's not ok to add a couple of hundred build warnings to the system,
> > sorry.
>
> Still, what about the whole series? What do you think about int->void
> migration for the remove() callback?
In thinking about it some more, I don't really see the point. We should
probably just do something about the return value, as that would be
better, and easier to do.
thanks,
greg k-h
next prev parent reply other threads:[~2008-12-17 21:38 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-10 16:26 [PATCH 1/28] drivers/base/platform.c: Drop return value from Julia Lawall
2008-12-10 16:26 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions Julia Lawall
2008-12-10 16:38 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from Alan Cox
2008-12-10 16:38 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions Alan Cox
2008-12-10 18:03 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from Vorobiev Dmitri
2008-12-10 18:03 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions Vorobiev Dmitri
2008-12-10 21:26 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from Anton Vorontsov
2008-12-10 21:26 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions Anton Vorontsov
2008-12-10 22:06 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from Vorobiev Dmitri
2008-12-10 22:06 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions Vorobiev Dmitri
2008-12-10 22:06 ` Vorobiev Dmitri
2008-12-10 22:48 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from Anton Vorontsov
2008-12-10 22:48 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions Anton Vorontsov
2008-12-10 17:28 ` Mike Frysinger
2008-12-10 17:28 ` Mike Frysinger
2008-12-10 22:18 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from Vorobiev Dmitri
2008-12-10 22:18 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions Vorobiev Dmitri
2008-12-10 22:37 ` Mike Frysinger
2008-12-10 22:37 ` Mike Frysinger
2008-12-12 5:17 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from Greg KH
2008-12-12 5:17 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions Greg KH
2008-12-12 11:00 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from Dmitri Vorobiev
2008-12-12 11:00 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions Dmitri Vorobiev
2008-12-17 21:38 ` Greg KH [this message]
2008-12-17 21:38 ` Greg KH
2008-12-12 21:00 ` Mike Frysinger
2008-12-12 21:00 ` Mike Frysinger
2008-12-17 21:37 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from Greg KH
2008-12-17 21:37 ` [PATCH 1/28] drivers/base/platform.c: Drop return value from platform_driver remove functions Greg KH
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=20081217213826.GD26923@suse.de \
--to=gregkh@suse.de \
--cc=dmitri.vorobiev@movial.fi \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vapier.adi@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.