* [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR @ 2013-03-12 18:13 Silviu-Mihai Popescu 2013-03-13 9:31 ` David Miller 0 siblings, 1 reply; 7+ messages in thread From: Silviu-Mihai Popescu @ 2013-03-12 18:13 UTC (permalink / raw) To: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA Cc: marcel-kz+m5ild9QBg9hUCZPvPmw, gustavo-THi1TnShQwVAfugRpC6u6w, johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w, davem-fT/PcQaiUtIeIZ0/mPfg9Q, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Silviu-Mihai Popescu This uses PTR_RET instead of IS_ERR and PTR_ERR in order to increase readability. Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> --- net/bluetooth/hci_sysfs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 23b4e24..6fb5065 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c @@ -590,10 +590,7 @@ int __init bt_sysfs_init(void) bt_debugfs = debugfs_create_dir("bluetooth", NULL); bt_class = class_create(THIS_MODULE, "bluetooth"); - if (IS_ERR(bt_class)) - return PTR_ERR(bt_class); - - return 0; + return PTR_RET(bt_class) } void bt_sysfs_cleanup(void) -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR 2013-03-12 18:13 [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR Silviu-Mihai Popescu @ 2013-03-13 9:31 ` David Miller [not found] ` <20130313.053145.2200448840921851390.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: David Miller @ 2013-03-13 9:31 UTC (permalink / raw) To: silviupopescu1990 Cc: linux-bluetooth, marcel, gustavo, johan.hedberg, netdev, linux-kernel From: Silviu-Mihai Popescu <silviupopescu1990@gmail.com> Date: Tue, 12 Mar 2013 20:13:15 +0200 > @@ -590,10 +590,7 @@ int __init bt_sysfs_init(void) > bt_debugfs = debugfs_create_dir("bluetooth", NULL); > > bt_class = class_create(THIS_MODULE, "bluetooth"); > - if (IS_ERR(bt_class)) > - return PTR_ERR(bt_class); > - > - return 0; > + return PTR_RET(bt_class) Don't bother submitting patches you aren't even going to try to compile. I'm rejecting all of your current submissions. Resubmit them when you feel like typing 'make' from time to time. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20130313.053145.2200448840921851390.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>]
* Re: [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR [not found] ` <20130313.053145.2200448840921851390.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> @ 2013-03-18 18:05 ` Silviu Popescu [not found] ` <CAPWTe+JzznuWYKksAfxkD=u9kv8DuAF4v2AWVxd2OUeDtCYKBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2013-03-18 18:13 ` Silviu Popescu 0 siblings, 2 replies; 7+ messages in thread From: Silviu Popescu @ 2013-03-18 18:05 UTC (permalink / raw) To: David Miller Cc: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, marcel-kz+m5ild9QBg9hUCZPvPmw, gustavo-THi1TnShQwVAfugRpC6u6w, johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA On Wed, Mar 13, 2013 at 11:31 AM, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote: > From: Silviu-Mihai Popescu <silviupopescu1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Date: Tue, 12 Mar 2013 20:13:15 +0200 > >> @@ -590,10 +590,7 @@ int __init bt_sysfs_init(void) >> bt_debugfs = debugfs_create_dir("bluetooth", NULL); >> >> bt_class = class_create(THIS_MODULE, "bluetooth"); >> - if (IS_ERR(bt_class)) >> - return PTR_ERR(bt_class); >> - >> - return 0; >> + return PTR_RET(bt_class) > > Don't bother submitting patches you aren't even going to try > to compile. > > I'm rejecting all of your current submissions. Resubmit them > when you feel like typing 'make' from time to time. > > Sorry for the trouble caused and sorry for the late reply. That being said, I'd like to understand a bit better what exactly I messed up. I've just pulled the latest revision of the mainline kernel and made the changes in this patch. I've tried with make defconfig (which would be x86_64_defconfig in my case), followed by make menuconfig to select the bluetooth options and make allyesconfig. Both defconfig and allyesconfig compile successfully on my system. Would you be so kind as to tell me what error you have encountered? Or perhaps enlighten me as to what I'm still doing wrong. I'd like to learn from my mistakes. Thanks, Silviu Popescu ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAPWTe+JzznuWYKksAfxkD=u9kv8DuAF4v2AWVxd2OUeDtCYKBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR [not found] ` <CAPWTe+JzznuWYKksAfxkD=u9kv8DuAF4v2AWVxd2OUeDtCYKBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2013-03-18 18:08 ` David Miller 2013-03-18 18:13 ` Joe Perches 1 sibling, 0 replies; 7+ messages in thread From: David Miller @ 2013-03-18 18:08 UTC (permalink / raw) To: silviupopescu1990-Re5JQEeQqe8AvxtiuMwx3w Cc: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, marcel-kz+m5ild9QBg9hUCZPvPmw, gustavo-THi1TnShQwVAfugRpC6u6w, johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA From: Silviu Popescu <silviupopescu1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Date: Mon, 18 Mar 2013 20:05:42 +0200 >>> + return PTR_RET(bt_class) .. > That being said, I'd like to understand a bit better what exactly I messed up. There's no semicolon at the end of the return statement. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR [not found] ` <CAPWTe+JzznuWYKksAfxkD=u9kv8DuAF4v2AWVxd2OUeDtCYKBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2013-03-18 18:08 ` David Miller @ 2013-03-18 18:13 ` Joe Perches 1 sibling, 0 replies; 7+ messages in thread From: Joe Perches @ 2013-03-18 18:13 UTC (permalink / raw) To: Silviu Popescu Cc: David Miller, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, marcel-kz+m5ild9QBg9hUCZPvPmw, gustavo-THi1TnShQwVAfugRpC6u6w, johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA On Mon, 2013-03-18 at 20:05 +0200, Silviu Popescu wrote: > On Wed, Mar 13, 2013 at 11:31 AM, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote: > > From: Silviu-Mihai Popescu <silviupopescu1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > Date: Tue, 12 Mar 2013 20:13:15 +0200 > > > >> @@ -590,10 +590,7 @@ int __init bt_sysfs_init(void) > >> bt_debugfs = debugfs_create_dir("bluetooth", NULL); > >> > >> bt_class = class_create(THIS_MODULE, "bluetooth"); > >> - if (IS_ERR(bt_class)) > >> - return PTR_ERR(bt_class); > >> - > >> - return 0; > >> + return PTR_RET(bt_class) > > > > Don't bother submitting patches you aren't even going to try > > to compile. > > > > I'm rejecting all of your current submissions. Resubmit them > > when you feel like typing 'make' from time to time. > > > > > > Sorry for the trouble caused and sorry for the late reply. > That being said, I'd like to understand a bit better what exactly I messed up. > I've just pulled the latest revision of the mainline kernel and made > the changes in this patch. > I've tried with make defconfig (which would be x86_64_defconfig in my > case), followed by > make menuconfig to select the bluetooth options and make allyesconfig. > Both defconfig and allyesconfig compile successfully on my system. > Would you be so kind as to tell me what error you have encountered? > Or perhaps enlighten me as to what I'm still doing wrong. I'd like to > learn from my mistakes. You do have to ensure that the file you modify is actually compiled. Sometimes it's easier to type make path/file.o In any case, this is missing the statement terminating semicolon after PTR_RET(bt_class). ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR 2013-03-18 18:05 ` Silviu Popescu [not found] ` <CAPWTe+JzznuWYKksAfxkD=u9kv8DuAF4v2AWVxd2OUeDtCYKBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2013-03-18 18:13 ` Silviu Popescu [not found] ` <CAPWTe+Kfr=zD6oJsfX3W8Ze1iH+CoEHx5FXo4YaVtQuMHD5k_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 1 sibling, 1 reply; 7+ messages in thread From: Silviu Popescu @ 2013-03-18 18:13 UTC (permalink / raw) To: David Miller Cc: linux-bluetooth, marcel, gustavo, johan.hedberg, netdev, linux-kernel On Mon, Mar 18, 2013 at 8:05 PM, Silviu Popescu <silviupopescu1990@gmail.com> wrote: > On Wed, Mar 13, 2013 at 11:31 AM, David Miller <davem@davemloft.net> wrote: >> From: Silviu-Mihai Popescu <silviupopescu1990@gmail.com> >> Date: Tue, 12 Mar 2013 20:13:15 +0200 >> >>> @@ -590,10 +590,7 @@ int __init bt_sysfs_init(void) >>> bt_debugfs = debugfs_create_dir("bluetooth", NULL); >>> >>> bt_class = class_create(THIS_MODULE, "bluetooth"); >>> - if (IS_ERR(bt_class)) >>> - return PTR_ERR(bt_class); >>> - >>> - return 0; >>> + return PTR_RET(bt_class) >> >> Don't bother submitting patches you aren't even going to try >> to compile. >> >> I'm rejecting all of your current submissions. Resubmit them >> when you feel like typing 'make' from time to time. >> >> > > Sorry for the trouble caused and sorry for the late reply. > That being said, I'd like to understand a bit better what exactly I messed up. > I've just pulled the latest revision of the mainline kernel and made > the changes in this patch. > I've tried with make defconfig (which would be x86_64_defconfig in my > case), followed by > make menuconfig to select the bluetooth options and make allyesconfig. > Both defconfig and allyesconfig compile successfully on my system. > Would you be so kind as to tell me what error you have encountered? > Or perhaps enlighten me as to what I'm still doing wrong. I'd like to > learn from my mistakes. Please ignore this gratuitous stupidity. The right patch was applied locally, the wrong one sent to the list. I'll resubmit the proper one. -- Silviu Popescu ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAPWTe+Kfr=zD6oJsfX3W8Ze1iH+CoEHx5FXo4YaVtQuMHD5k_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR [not found] ` <CAPWTe+Kfr=zD6oJsfX3W8Ze1iH+CoEHx5FXo4YaVtQuMHD5k_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2013-03-18 18:19 ` Gustavo Padovan 0 siblings, 0 replies; 7+ messages in thread From: Gustavo Padovan @ 2013-03-18 18:19 UTC (permalink / raw) To: Silviu Popescu Cc: David Miller, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, marcel-kz+m5ild9QBg9hUCZPvPmw, johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 2043 bytes --] Hi Silviu, * Silviu Popescu <silviupopescu1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> [2013-03-18 20:13:50 +0200]: > On Mon, Mar 18, 2013 at 8:05 PM, Silviu Popescu > <silviupopescu1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Wed, Mar 13, 2013 at 11:31 AM, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote: > >> From: Silviu-Mihai Popescu <silviupopescu1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> Date: Tue, 12 Mar 2013 20:13:15 +0200 > >> > >>> @@ -590,10 +590,7 @@ int __init bt_sysfs_init(void) > >>> bt_debugfs = debugfs_create_dir("bluetooth", NULL); > >>> > >>> bt_class = class_create(THIS_MODULE, "bluetooth"); > >>> - if (IS_ERR(bt_class)) > >>> - return PTR_ERR(bt_class); > >>> - > >>> - return 0; > >>> + return PTR_RET(bt_class) > >> > >> Don't bother submitting patches you aren't even going to try > >> to compile. > >> > >> I'm rejecting all of your current submissions. Resubmit them > >> when you feel like typing 'make' from time to time. > >> > >> > > > > Sorry for the trouble caused and sorry for the late reply. > > That being said, I'd like to understand a bit better what exactly I messed up. > > I've just pulled the latest revision of the mainline kernel and made > > the changes in this patch. > > I've tried with make defconfig (which would be x86_64_defconfig in my > > case), followed by > > make menuconfig to select the bluetooth options and make allyesconfig. > > Both defconfig and allyesconfig compile successfully on my system. > > Would you be so kind as to tell me what error you have encountered? > > Or perhaps enlighten me as to what I'm still doing wrong. I'd like to > > learn from my mistakes. > > Please ignore this gratuitous stupidity. > The right patch was applied locally, the wrong one sent to the list. > I'll resubmit the proper one. Someone already sent me a similar patch, so this is already fixed in bluetooth-next. No need to resubmit this one. Gustavo [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-18 18:19 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-03-12 18:13 [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR Silviu-Mihai Popescu 2013-03-13 9:31 ` David Miller [not found] ` <20130313.053145.2200448840921851390.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> 2013-03-18 18:05 ` Silviu Popescu [not found] ` <CAPWTe+JzznuWYKksAfxkD=u9kv8DuAF4v2AWVxd2OUeDtCYKBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2013-03-18 18:08 ` David Miller 2013-03-18 18:13 ` Joe Perches 2013-03-18 18:13 ` Silviu Popescu [not found] ` <CAPWTe+Kfr=zD6oJsfX3W8Ze1iH+CoEHx5FXo4YaVtQuMHD5k_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2013-03-18 18:19 ` Gustavo Padovan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).