Message ID | 1278681612-10521-2-git-send-email-dedekind1@gmail.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Tony Lindgren |
Headers | show |
Artem Bityutskiy had written, on 07/09/2010 08:20 AM, the following: > From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> > > Do not forget to check the 'platform_device_add_data()' error code > in 'omap_device_build_ss()'. > > Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Acked-by: Nishanth Menon <nm@ti.com> > --- > arch/arm/plat-omap/omap_device.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c > index f2bd2e2..e8da192 100644 > --- a/arch/arm/plat-omap/omap_device.c > +++ b/arch/arm/plat-omap/omap_device.c > @@ -414,7 +414,9 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, > od->pdev.num_resources = res_count; > od->pdev.resource = res; > > - platform_device_add_data(&od->pdev, pdata, pdata_len); > + ret = platform_device_add_data(&od->pdev, pdata, pdata_len); > + if (ret) > + goto odbs_exit4; > > od->pm_lats = pm_lats; > od->pm_lats_cnt = pm_lats_cnt;
>>-----Original Message----- >>From: Artem Bityutskiy [mailto:dedekind1@gmail.com] >>Sent: Friday, July 09, 2010 6:50 PM >>To: linux-omap@vger.kernel.org >>Cc: Menon, Nishanth; Kevin Hilman; Gopinath, Thara; Peter p2 De Schrijver >>Subject: [PATCH 2/2] omap3: sr: improve errors handling >> >>From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> >> >>Do not forget to check the 'platform_device_add_data()' error code >>in 'omap_device_build_ss()'. Hello Artem, Can we have a better subject and description. The subject esp has got nothing to do with the fix. Regards Thara >> >>Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> >>--- >> arch/arm/plat-omap/omap_device.c | 4 +++- >> 1 files changed, 3 insertions(+), 1 deletions(-) >> >>diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c >>index f2bd2e2..e8da192 100644 >>--- a/arch/arm/plat-omap/omap_device.c >>+++ b/arch/arm/plat-omap/omap_device.c >>@@ -414,7 +414,9 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, >> od->pdev.num_resources = res_count; >> od->pdev.resource = res; >> >>- platform_device_add_data(&od->pdev, pdata, pdata_len); >>+ ret = platform_device_add_data(&od->pdev, pdata, pdata_len); >>+ if (ret) >>+ goto odbs_exit4; >> >> od->pm_lats = pm_lats; >> od->pm_lats_cnt = pm_lats_cnt; >>-- >>1.7.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 2010-07-09 at 20:35 +0530, Gopinath, Thara wrote: > > >>-----Original Message----- > >>From: Artem Bityutskiy [mailto:dedekind1@gmail.com] > >>Sent: Friday, July 09, 2010 6:50 PM > >>To: linux-omap@vger.kernel.org > >>Cc: Menon, Nishanth; Kevin Hilman; Gopinath, Thara; Peter p2 De Schrijver > >>Subject: [PATCH 2/2] omap3: sr: improve errors handling > >> > >>From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> > >> > >>Do not forget to check the 'platform_device_add_data()' error code > >>in 'omap_device_build_ss()'. > > Hello Artem, > > Can we have a better subject and description. The subject esp has got > nothing to do with the fix. Hmm, I do not see why you think so. I think the subject is fine - the patch improves error handling in the SR code. Then description says how exactly it improves it - it makes the code to not forget to check the return code, and it tells in which function and which return code. So the logic is: 1. The subject line is a short description which gives the idea what the commit is about. So, my subject line says: 1.1. It is about omap3 (which is true) 1.2. It is about sr (which is true) 1.3. It improves error handling (which is also true) So the subject line is descriptive enough. It does not have to provide all glory details. Then the description provides the details.
On Fri, 2010-07-09 at 10:51 -0500, Nishanth Menon wrote: > > So the logic is: > > > > 1. The subject line is a short description which gives the idea what the > > commit is about. So, my subject line says: > > 1.1. It is about omap3 (which is true) > > 1.2. It is about sr (which is true) > I think Thara's contention is that this is omap_device related- yeah SR > is one of the users of omap_device, but there are much more folks using > omap_device in l-o today. I see. I'll try to come up with a better prefix, but if you suggest me a good subject line, I'll be grateful :-)
Artem Bityutskiy had written, on 07/09/2010 10:44 AM, the following: > On Fri, 2010-07-09 at 20:35 +0530, Gopinath, Thara wrote: >>>> -----Original Message----- >>>> From: Artem Bityutskiy [mailto:dedekind1@gmail.com] >>>> Sent: Friday, July 09, 2010 6:50 PM >>>> To: linux-omap@vger.kernel.org >>>> Cc: Menon, Nishanth; Kevin Hilman; Gopinath, Thara; Peter p2 De Schrijver >>>> Subject: [PATCH 2/2] omap3: sr: improve errors handling >>>> >>>> From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> >>>> >>>> Do not forget to check the 'platform_device_add_data()' error code >>>> in 'omap_device_build_ss()'. >> Hello Artem, >> >> Can we have a better subject and description. The subject esp has got >> nothing to do with the fix. > > Hmm, I do not see why you think so. I think the subject is fine - the > patch improves error handling in the SR code. Then description says how > exactly it improves it - it makes the code to not forget to check the > return code, and it tells in which function and which return code. > > So the logic is: > > 1. The subject line is a short description which gives the idea what the > commit is about. So, my subject line says: > 1.1. It is about omap3 (which is true) > 1.2. It is about sr (which is true) I think Thara's contention is that this is omap_device related- yeah SR is one of the users of omap_device, but there are much more folks using omap_device in l-o today. > 1.3. It improves error handling (which is also true) > > So the subject line is descriptive enough. It does not have to provide > all glory details. > > Then the description provides the details. >
On Fri, 2010-07-09 at 11:00 -0500, Menon, Nishanth wrote: > > -----Original Message----- > > From: Artem Bityutskiy [mailto:dedekind1@gmail.com] > > Sent: Friday, July 09, 2010 10:51 AM > > > > On Fri, 2010-07-09 at 10:51 -0500, Nishanth Menon wrote: > > > > So the logic is: > > > > > > > > 1. The subject line is a short description which gives the idea what > > the > > > > commit is about. So, my subject line says: > > > > 1.1. It is about omap3 (which is true) > > > > 1.2. It is about sr (which is true) > > > I think Thara's contention is that this is omap_device related- yeah SR > > > is one of the users of omap_device, but there are much more folks using > > > omap_device in l-o today. > > > > I see. I'll try to come up with a better prefix, but if you suggest me a > > good subject line, I'll be grateful :-) > > Subject: omap: device: improve errors handling > > Do not forget to check the 'platform_device_add_data()' error code > in 'omap_device_build_ss()'. > > How does that sound? Good, thank you! I'll re-send the patch tomorrow unless you change the subject yourself :-)
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index f2bd2e2..e8da192 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -414,7 +414,9 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, od->pdev.num_resources = res_count; od->pdev.resource = res; - platform_device_add_data(&od->pdev, pdata, pdata_len); + ret = platform_device_add_data(&od->pdev, pdata, pdata_len); + if (ret) + goto odbs_exit4; od->pm_lats = pm_lats; od->pm_lats_cnt = pm_lats_cnt;