On 06/16/2014 07:00 PM, Joe Perches wrote:
> On Mon, 2014-06-16 at 17:44 -0700, Anish Bhatt wrote:
>> My code has multiple exit lables:
>> void function(void)
>> {
>> ...
>>
>> if (err1)
>> goto exit1;
>> ...
>> if (err2)
>> goto exit2;
>>
>> ...
On 06/16/2014 07:00 PM, Joe Perches wrote:
On Mon, 2014-06-16 at 17:44 -0700, Anish Bhatt wrote:
My code has multiple exit lables:
void function(void)
{
...
if (err1)
goto exit1;
...
if (err2)
goto exit2;
...
return; /* Good
On Tue, Jun 17, 2014 at 8:55 AM, Joe Perches wrote:
> On Tue, 2014-06-17 at 08:46 +0530, Sachin Kamat wrote:
>> On Tue, Jun 17, 2014 at 7:30 AM, Joe Perches wrote:
>> > On Mon, 2014-06-16 at 17:44 -0700, Anish Bhatt wrote:
>> >> My code has multiple exit lables:
>> >> void function(void)
>> >> {
On Tue, 2014-06-17 at 08:46 +0530, Sachin Kamat wrote:
> On Tue, Jun 17, 2014 at 7:30 AM, Joe Perches wrote:
> > On Mon, 2014-06-16 at 17:44 -0700, Anish Bhatt wrote:
> >> My code has multiple exit lables:
> >> void function(void)
> >> {
> >> ...
> >>
> >> if (err1)
> >>
On Tue, Jun 17, 2014 at 7:30 AM, Joe Perches wrote:
> On Mon, 2014-06-16 at 17:44 -0700, Anish Bhatt wrote:
>> My code has multiple exit lables:
>> void function(void)
>> {
>> ...
>>
>> if (err1)
>> goto exit1;
>> ...
>> if (err2)
>> goto exit2;
On Mon, 2014-06-16 at 17:44 -0700, Anish Bhatt wrote:
> My code has multiple exit lables:
> void function(void)
> {
> ...
>
> if (err1)
> goto exit1;
> ...
> if (err2)
> goto exit2;
>
> ...
> return; /* Good return, no errors */
>
My code has multiple exit lables:
void function(void)
{
...
if (err1)
goto exit1;
...
if (err2)
goto exit2;
...
return; /* Good return, no errors */
exit1:
printk(err1);
return;
exit2:
On Mon, 2014-06-16 at 16:28 -0700, Anish Bhatt wrote:
> This seems to ignore the ability to exit from void
> return functions via a `return;` in case of an error
> or similar. Any attempt to bail out generates warnings
> with checkpathch.pl Perhaps it should check for returns
> only at the end of
This seems to ignore the ability to exit from void return functions via a
`return;` in case of an error or similar. Any attempt to bail out generates
warnings with checkpathch.pl Perhaps it should check for returns only at the
end of the function ? If not, is there a suggested way to do this ?
This seems to ignore the ability to exit from void return functions via a
`return;` in case of an error or similar. Any attempt to bail out generates
warnings with checkpathch.pl Perhaps it should check for returns only at the
end of the function ? If not, is there a suggested way to do this ?
On Mon, 2014-06-16 at 16:28 -0700, Anish Bhatt wrote:
This seems to ignore the ability to exit from void
return functions via a `return;` in case of an error
or similar. Any attempt to bail out generates warnings
with checkpathch.pl Perhaps it should check for returns
only at the end of the
My code has multiple exit lables:
void function(void)
{
...
if (err1)
goto exit1;
...
if (err2)
goto exit2;
...
return; /* Good return, no errors */
exit1:
printk(err1);
return;
exit2:
On Mon, 2014-06-16 at 17:44 -0700, Anish Bhatt wrote:
My code has multiple exit lables:
void function(void)
{
...
if (err1)
goto exit1;
...
if (err2)
goto exit2;
...
return; /* Good return, no errors */
exit1:
On Tue, Jun 17, 2014 at 7:30 AM, Joe Perches j...@perches.com wrote:
On Mon, 2014-06-16 at 17:44 -0700, Anish Bhatt wrote:
My code has multiple exit lables:
void function(void)
{
...
if (err1)
goto exit1;
...
if (err2)
goto exit2;
On Tue, 2014-06-17 at 08:46 +0530, Sachin Kamat wrote:
On Tue, Jun 17, 2014 at 7:30 AM, Joe Perches j...@perches.com wrote:
On Mon, 2014-06-16 at 17:44 -0700, Anish Bhatt wrote:
My code has multiple exit lables:
void function(void)
{
...
if (err1)
goto
On Tue, Jun 17, 2014 at 8:55 AM, Joe Perches j...@perches.com wrote:
On Tue, 2014-06-17 at 08:46 +0530, Sachin Kamat wrote:
On Tue, Jun 17, 2014 at 7:30 AM, Joe Perches j...@perches.com wrote:
On Mon, 2014-06-16 at 17:44 -0700, Anish Bhatt wrote:
My code has multiple exit lables:
void
void function lines that use a single tab then "return;"
are generally unnecessary.
Signed-off-by: Joe Perches
---
scripts/checkpatch.pl | 7 +++
1 file changed, 7 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7774025..f9bb12c 100755
---
void function lines that use a single tab then return;
are generally unnecessary.
Signed-off-by: Joe Perches j...@perches.com
---
scripts/checkpatch.pl | 7 +++
1 file changed, 7 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7774025..f9bb12c 100755
---
18 matches
Mail list logo