Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1717463
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [alsa-devel] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() |
| Date | 2017-08-22 16:40 +0200 |
| Message-ID | <uhivw-3DB-7@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <uhgtH-2jA-7@gated-at.bofh.it> <uhgWK-2vU-19@gated-at.bofh.it> <uhgWK-2vU-17@gated-at.bofh.it> <uhhg5-2TJ-15@gated-at.bofh.it> <uhi2t-3sd-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
>> I got the impression that the functions which are called at the updated places >> by the function “snd_card_pcsp_probe” indicate a successful execution >> only by zero so far. > > You have the impression, great. This aspect is also a general programming interface issue for some functions. > And what's the reason to drop the negative check? * I find it a bit safer when the error predicate is “return value != 0”. * It is also a small source code reduction. > It's not clearer, not better readable. It seems that we have got different development opinions this time. > And, the worst part is that you've done it silently even without > mentioning in the change log at all. That's really bad. > Just don't do it. I found it not relevant enough for the commit message. > For example, the control API functions may return the positive number > when the value got changed, 0 for else, and a negative number for the > error. The functions returning some numbers may return positive > numbers, of course. Did I touch any specific function calls which belong to this programming interface category? Regards, Markus
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-22 14:20 +0200
Re: [PATCH] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() Takashi Iwai <tiwai@suse.de> - 2017-08-22 14:30 +0200
Re: [alsa-devel] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() Takashi Iwai <tiwai@suse.de> - 2017-08-22 15:00 +0200
Re: [alsa-devel] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-22 15:20 +0200
Re: [alsa-devel] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() Takashi Iwai <tiwai@suse.de> - 2017-08-22 16:10 +0200
Re: [alsa-devel] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-22 16:40 +0200
Re: [alsa-devel] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() Takashi Iwai <tiwai@suse.de> - 2017-08-22 16:50 +0200
Re: [alsa-devel] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() Takashi Iwai <tiwai@suse.de> - 2017-08-22 17:10 +0200
[PATCH v3] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-22 17:50 +0200
Re: [PATCH v3] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() Takashi Iwai <tiwai@suse.de> - 2017-08-22 18:10 +0200
Re: [alsa-devel] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-22 17:10 +0200
Re: ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-22 15:00 +0200
[PATCH v2] ALSA: pcsp: Use common error handling code in snd_card_pcsp_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-22 16:10 +0200
csiph-web