Skip to contentSkip to conversation

usb-core: Remove Fix mes in file hcd.c

PATCH In review Nicholas Krause 4 participants 10 messages Jul 18, 2014 – Jul 24, 2014 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb-core: Remove Fix mes in file hcd.c

I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

---
 drivers/usb/core/hcd.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/usb/core/hcd.c +0 -4
index bec31e2..487abcf 100644
@@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
 	struct usb_bus *usb_bus = rh_usb_dev->bus;
 	struct usb_hcd *usb_hcd;
 
-	if (usb_bus == NULL)	/* FIXME: not sure if this case is possible */
-		return -ENODEV;
 	usb_hcd = bus_to_hcd(usb_bus);
 	return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
 }
@@ -871,8 +869,6 @@ static ssize_t authorized_default_store(struct device *dev,
 	struct usb_bus *usb_bus = rh_usb_dev->bus;
 	struct usb_hcd *usb_hcd;
 
-	if (usb_bus == NULL)	/* FIXME: not sure if this case is possible */
-		return -ENODEV;
 	usb_hcd = bus_to_hcd(usb_bus);
 	result = sscanf(buf, "%u\n", &val);
 	if (result == 1) {
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 23 lines · Nicholas Krause

I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

---
 drivers/usb/core/hcd.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/usb/core/hcd.c +0 -2
index bec31e2..487abcf 100644
@@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
 	struct usb_bus *usb_bus = rh_usb_dev->bus;
 	struct usb_hcd *usb_hcd;
 
-	if (usb_bus == NULL)	/* FIXME: not sure if this case is possible */
-		return -ENODEV;
 	usb_hcd = bus_to_hcd(usb_bus);
 	return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
 }

drivers/usb/core/hcd.c static ssize_t authorized_default_store(struct device *dev, · line 874

Quoted 8 lines
drivers/usb/core/hcd.c +0 -2
@@ -871,8 +869,6 @@ static ssize_t authorized_default_store(struct device *dev,
 	struct usb_bus *usb_bus = rh_usb_dev->bus;
 	struct usb_hcd *usb_hcd;
 
-	if (usb_bus == NULL)	/* FIXME: not sure if this case is possible */
-		return -ENODEV;
 	usb_hcd = bus_to_hcd(usb_bus);
 	result = sscanf(buf, "%u\n", &val);
 	if (result == 1) {
#2 lore raw
Quoted 28 lines · Alan Stern
Quoted 26 lines · Nicholas Krause

I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

---
 drivers/usb/core/hcd.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/usb/core/hcd.c +0 -2
index bec31e2..487abcf 100644
@@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
      struct usb_bus *usb_bus = rh_usb_dev->bus;
      struct usb_hcd *usb_hcd;
 
-     if (usb_bus == NULL)    /* FIXME: not sure if this case is possible */
-             return -ENODEV;
      usb_hcd = bus_to_hcd(usb_bus);
      return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
 }
@@ -871,8 +869,6 @@ static ssize_t authorized_default_store(struct device *dev,
      struct usb_bus *usb_bus = rh_usb_dev->bus;
      struct usb_hcd *usb_hcd;
 
Quoted 8 lines

drivers/usb/core/hcd.c static ssize_t authorized_default_store(struct device *dev, · line 874

Quoted 5 lines
drivers/usb/core/hcd.c +0 -2
-     if (usb_bus == NULL)    /* FIXME: not sure if this case is possible */
-             return -ENODEV;
      usb_hcd = bus_to_hcd(usb_bus);
      result = sscanf(buf, "%u\n", &val);
      if (result == 1) {

Great to hear this is going through :).
Nick

#3 lore raw
In reply to Nicholas Krause
Quoted 5 lines · Nicholas Krause

I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

Please explain exactly why it's not needed, why it can never be NULL, and what prevents it from being NULL.

"after dicussing" (do you run spellcheck on your mails?) won't mean anything to someone looking at this commit in a year.

Your commit message also mentions usb_device which has nothing to do with your patch.

Thanks,
Sasha

#4 lore raw

Sorry didn't run spell check. I will resend this patch with the correct information
as needed. Thanks for the advice, Sasha.

Cheers Nick

Quoted 19 lines · Sasha Levin
Quoted 5 lines · Nicholas Krause

I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

Please explain exactly why it's not needed, why it can never be NULL, and what prevents it from being NULL.

"after dicussing" (do you run spellcheck on your mails?) won't mean anything to someone looking at this commit in a year.

Your commit message also mentions usb_device which has nothing to do with your patch.

Thanks,
Sasha

#5 lore raw
Quoted 4 lines · Nick Krause

Sorry didn't run spell check. I will resend this patch with the correct information
as needed. Thanks for the advice, Sasha.

Quoted 22 lines

Cheers Nick

Quoted 19 lines · Sasha Levin
Quoted 5 lines · Nicholas Krause

I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

Please explain exactly why it's not needed, why it can never be NULL, and what prevents it from being NULL.

"after dicussing" (do you run spellcheck on your mails?) won't mean anything to someone looking at this commit in a year.

Your commit message also mentions usb_device which has nothing to do with your patch.

Thanks,
Sasha

Sasha ,
Greg seems to have signed it off.
Cheers Nick

#6 lore raw
Quoted 25 lines · Nick Krause
Quoted 24 lines · Nick Krause

Sorry didn't run spell check. I will resend this patch with the correct information
as needed. Thanks for the advice, Sasha.

Cheers Nick

Quoted 17 lines · Sasha Levin
Quoted 5 lines · Nicholas Krause

I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

Please explain exactly why it's not needed, why it can never be NULL, and what prevents it from being NULL.

"after dicussing" (do you run spellcheck on your mails?) won't mean anything to someone looking at this commit in a year.

Your commit message also mentions usb_device which has nothing to do with your patch.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

Thanks,
Sasha

Sasha ,
Greg seems to have signed it off.
Cheers Nick

Greg?

Even if the patch is correct (and I'm not saying it is) the commit message is way off.

Thanks,
Sasha

#7 lore raw
Quoted 33 lines · Sasha Levin
Quoted 25 lines · Nick Krause
Quoted 24 lines · Nick Krause

Sorry didn't run spell check. I will resend this patch with the correct information
as needed. Thanks for the advice, Sasha.

Cheers Nick

Quoted 17 lines · Sasha Levin
Quoted 5 lines · Nicholas Krause

I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

Please explain exactly why it's not needed, why it can never be NULL, and what prevents it from being NULL.

"after dicussing" (do you run spellcheck on your mails?) won't mean anything to someone looking at this commit in a year.

Your commit message also mentions usb_device which has nothing to do with your patch.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

Thanks,
Sasha

Sasha ,
Greg seems to have signed it off.
Cheers Nick

Quoted 7 lines

Greg?

Even if the patch is correct (and I'm not saying it is) the commit message is way off.

Thanks,
Sasha

Sasha,
The patch is in the kernel now. I am not going through the trouble of removing it, if you want to fix the commit message go on ahead.
Nick

#8 lore raw
Quoted 24 lines · Nick Krause
Quoted 23 lines · Sasha Levin
Quoted 10 lines · Nick Krause
Quoted 10 lines
Quoted 10 lines

Please explain exactly why it's not needed, why it can never be NULL, and what prevents it from being NULL.

"after dicussing" (do you run spellcheck on your mails?) won't mean anything to someone looking at this commit in a year.

Your commit message also mentions usb_device which has nothing to do with your patch.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

Thanks,
Sasha

Sasha ,
Greg seems to have signed it off.
Cheers Nick

Greg?

Even if the patch is correct (and I'm not saying it is) the commit message is way off.

Quoted 6 lines
Quoted 2 lines

Thanks,
Sasha

Sasha,
The patch is in the kernel now.

Greg's tree is not Linus' tree, so it's not set to stone in git commit history yet.

Quoted 3 lines

I am not going through the trouble of removing it, if you want to fix the commit message go on ahead. Nick

This kind of attitude might significantly lower your chances of future patches being accepted.

Vlastimil

Quoted 6 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#9 lore raw
Quoted 49 lines · Vlastimil Babka
Quoted 33 lines · Nick Krause
Quoted 31 lines · Sasha Levin
Quoted 14 lines · Nick Krause
Quoted 14 lines
Quoted 14 lines

Please explain exactly why it's not needed, why it can never be NULL, and
what prevents it from being NULL.

"after dicussing" (do you run spellcheck on your mails?) won't mean anything
to someone looking at this commit in a year.

Your commit message also mentions usb_device which has nothing to do with
your patch.

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

Thanks,
Sasha

Sasha ,
Greg seems to have signed it off.
Cheers Nick

Greg?

Even if the patch is correct (and I'm not saying it is) the commit message is way off.

Quoted 7 lines
Quoted 2 lines

Thanks,
Sasha

Sasha,
The patch is in the kernel now.

Greg's tree is not Linus' tree, so it's not set to stone in git commit history yet.

Quoted 2 lines

I am not going through the trouble of removing

Quoted 17 lines
Quoted 2 lines

it, if you want to fix the commit message go on ahead. Nick

This kind of attitude might significantly lower your chances of future patches being accepted.

Vlastimil

Quoted 6 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

I thought Greg's tree get's directly into the mainline and after checking it seems to me in
the mainline.
Cheers Nick