Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300760
| From | Heiko Carstens <heiko.carstens@de.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] 390/qeth: Refactoring for qeth_core_set_online() |
| Date | 2016-01-04 15:10 +0100 |
| Message-ID | <qNdZD-4ui-5@gated-at.bofh.it> (permalink) |
| References | <qEuGl-43C-5@gated-at.bofh.it> <qMNLQ-40q-9@gated-at.bofh.it> <qMNLQ-40q-17@gated-at.bofh.it> <qNbEu-2Rt-15@gated-at.bofh.it> <qNddg-3WR-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] 390/qeth: Fine-tuning for qeth_core_set_online() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 11:10 +0100
[PATCH 1/2] 390/qeth: Delete an unnecessary variable initialisation in qeth_core_set_online() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 11:10 +0100
Re: [PATCH 1/2] 390/qeth: Delete an unnecessary variable initialisation in qeth_core_set_online() Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-01-04 12:30 +0100
Re: [PATCH 1/2] 390/qeth: Delete an unnecessary variable initialisation in qeth_core_set_online() Ursula Braun <ubraun@linux.vnet.ibm.com> - 2016-01-07 15:40 +0100
Re: 390/qeth: Delete an unnecessary variable initialisation in qeth_core_set_online() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-08 08:20 +0100
Re: 390/qeth: Delete an unnecessary variable initialisation in qeth_core_set_online() Ursula Braun <ubraun@linux.vnet.ibm.com> - 2016-01-08 09:30 +0100
Re: 390/qeth: Delete an unnecessary variable initialisation in qeth_core_set_online() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-08 13:10 +0100
[PATCH 2/2] 390/qeth: Refactoring for qeth_core_set_online() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 11:10 +0100
Re: [PATCH 2/2] 390/qeth: Refactoring for qeth_core_set_online() Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-01-04 12:40 +0100
Re: [PATCH 2/2] 390/qeth: Refactoring for qeth_core_set_online() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-04 14:20 +0100
Re: [PATCH 2/2] 390/qeth: Refactoring for qeth_core_set_online() Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-01-04 15:10 +0100
Re: 390/qeth: Refactoring for qeth_core_set_online() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-04 15:20 +0100
Re: 390/qeth: Refactoring for qeth_core_set_online() Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-01-05 09:00 +0100
csiph-web