lkml.org 
[lkml]   [2016]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] 390/qeth: Refactoring for qeth_core_set_online()
On Mon, Jan 04, 2016 at 02:10:34PM +0100, SF Markus Elfring wrote:
> >> +++ b/drivers/s390/net/qeth_core_main.c
> >> @@ -5638,9 +5638,10 @@ static int qeth_core_set_online(struct ccwgroup_device *gdev)
> >> {
> >> struct qeth_card *card = dev_get_drvdata(&gdev->dev);
> >> int rc;
> >> - int def_discipline;
> >>
> >> if (!card->discipline) {
> >> + int def_discipline;
> >> +
> >> if (card->info.type == QETH_CARD_TYPE_IQD)
> >> def_discipline = QETH_DISCIPLINE_LAYER3;
> >
> > Same here: I don't think we want to start with patches like this.
>
> Thanks for your feedback.
>
>
> > This going to be a never ending story without much benefit.
>
> Is the source code a bit clearer and safer if it will be expressed
> directly that the use of a specific variable is not intended for
> a complete function implementation but for the smaller scope
> of an if branch?

This depends on the function and what the author prefers. In this case the
function body is very small so I don't see any benefit at all.



\
 
 \ /
  Last update: 2016-01-04 15:21    [W:2.300 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site