linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb-core: Revert "usb-core: Remove Fix mes in file hcd.c"
@ 2014-07-23 12:56 Sasha Levin
  2014-07-23 16:49 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2014-07-23 12:56 UTC (permalink / raw)
  To: gregkh
  Cc: stern, mail, hdegoede, sarah.a.sharp, linux-usb, linux-kernel,
	rostedt, Sasha Levin, Sasha Levin

Revert since the commit message is incorrect and the original author refuses
to fix/maintain it because "it's in the kernel already".

Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/core/hcd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 487abcf..bec31e2 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -855,6 +855,8 @@ 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);
 }
@@ -869,6 +871,8 @@ 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) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb-core: Revert "usb-core: Remove Fix mes in file hcd.c"
  2014-07-23 12:56 [PATCH] usb-core: Revert "usb-core: Remove Fix mes in file hcd.c" Sasha Levin
@ 2014-07-23 16:49 ` Greg KH
  2014-07-24 13:14   ` Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2014-07-23 16:49 UTC (permalink / raw)
  To: Sasha Levin
  Cc: stern, mail, hdegoede, sarah.a.sharp, linux-usb, linux-kernel,
	rostedt, Sasha Levin

On Wed, Jul 23, 2014 at 08:56:10AM -0400, Sasha Levin wrote:
> Revert since the commit message is incorrect and the original author refuses
> to fix/maintain it because "it's in the kernel already".

How can someone "fix" a commit message that is already in the tree?  You
can't.  The code part is correct, so why introduce the issue back?

I understand your frustration at the original submitter (whom I have
personally kill-filed), but reverting the patch isn't going to do
anything good overall here, sorry.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb-core: Revert "usb-core: Remove Fix mes in file hcd.c"
  2014-07-23 16:49 ` Greg KH
@ 2014-07-24 13:14   ` Sasha Levin
  2014-07-24 16:04     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2014-07-24 13:14 UTC (permalink / raw)
  To: Greg KH
  Cc: stern, mail, hdegoede, sarah.a.sharp, linux-usb, linux-kernel,
	rostedt, Sasha Levin

On 07/23/2014 12:49 PM, Greg KH wrote:
> On Wed, Jul 23, 2014 at 08:56:10AM -0400, Sasha Levin wrote:
>> > Revert since the commit message is incorrect and the original author refuses
>> > to fix/maintain it because "it's in the kernel already".
> How can someone "fix" a commit message that is already in the tree?  You
> can't.  The code part is correct, so why introduce the issue back?

(I'm not trying to be aggressive, I just think that I misunderstand how this
part of the process works exactly).

I thought we can always edit -next trees? Why do we have to maintain fast forward
on them?

What happens, if for example you take a patch that causes build breakage? Would you
add a revert after that or just yank the commit out of the tree?

If you add a revert and leave the original broken commit in, wouldn't it cause issues
for anyone trying to bisect a build breakage?


Thanks,
Sasha

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb-core: Revert "usb-core: Remove Fix mes in file hcd.c"
  2014-07-24 13:14   ` Sasha Levin
@ 2014-07-24 16:04     ` Greg KH
  2014-07-24 16:20       ` Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2014-07-24 16:04 UTC (permalink / raw)
  To: Sasha Levin
  Cc: stern, mail, hdegoede, sarah.a.sharp, linux-usb, linux-kernel,
	rostedt, Sasha Levin

On Thu, Jul 24, 2014 at 09:14:49AM -0400, Sasha Levin wrote:
> On 07/23/2014 12:49 PM, Greg KH wrote:
> > On Wed, Jul 23, 2014 at 08:56:10AM -0400, Sasha Levin wrote:
> >> > Revert since the commit message is incorrect and the original author refuses
> >> > to fix/maintain it because "it's in the kernel already".
> > How can someone "fix" a commit message that is already in the tree?  You
> > can't.  The code part is correct, so why introduce the issue back?
> 
> (I'm not trying to be aggressive, I just think that I misunderstand how this
> part of the process works exactly).
> 
> I thought we can always edit -next trees? Why do we have to maintain fast forward
> on them?

I can never edit my public trees, because people base their work on
them, and they are public.

> What happens, if for example you take a patch that causes build breakage? Would you
> add a revert after that or just yank the commit out of the tree?

I add a revert, or add a patch that fixes it.

> If you add a revert and leave the original broken commit in, wouldn't it cause issues
> for anyone trying to bisect a build breakage?

Yes it does.

I can not rebase my public trees, nor should any other kernel
maintainer.  This has been true for _many_ years.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb-core: Revert "usb-core: Remove Fix mes in file hcd.c"
  2014-07-24 16:04     ` Greg KH
@ 2014-07-24 16:20       ` Sasha Levin
  2014-07-24 20:56         ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2014-07-24 16:20 UTC (permalink / raw)
  To: Greg KH
  Cc: stern, mail, hdegoede, sarah.a.sharp, linux-usb, linux-kernel,
	rostedt, Sasha Levin, Andrew Morton

On 07/24/2014 12:04 PM, Greg KH wrote:
>> If you add a revert and leave the original broken commit in, wouldn't it cause issues
>> > for anyone trying to bisect a build breakage?
> Yes it does.
> 
> I can not rebase my public trees, nor should any other kernel
> maintainer.  This has been true for _many_ years.

This isn't the case with -mm, for example, where the tree does get edited
quite often.

What stops you from editing it even if people are working on it? 'git pull --rebase'
will dtrt for both the ff and the non-ff case, where the non-ff case would have happen
either way if those people kept tracking your -next tree.


Thanks,
Sasha

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb-core: Revert "usb-core: Remove Fix mes in file hcd.c"
  2014-07-24 16:20       ` Sasha Levin
@ 2014-07-24 20:56         ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2014-07-24 20:56 UTC (permalink / raw)
  To: Sasha Levin
  Cc: stern, mail, hdegoede, sarah.a.sharp, linux-usb, linux-kernel,
	rostedt, Sasha Levin, Andrew Morton

On Thu, Jul 24, 2014 at 12:20:37PM -0400, Sasha Levin wrote:
> On 07/24/2014 12:04 PM, Greg KH wrote:
> >> If you add a revert and leave the original broken commit in, wouldn't it cause issues
> >> > for anyone trying to bisect a build breakage?
> > Yes it does.
> > 
> > I can not rebase my public trees, nor should any other kernel
> > maintainer.  This has been true for _many_ years.
> 
> This isn't the case with -mm, for example, where the tree does get edited
> quite often.

-mm is a set of quilt patches, not a git tree.

> What stops you from editing it even if people are working on it? 'git pull --rebase'
> will dtrt for both the ff and the non-ff case, where the non-ff case would have happen
> either way if those people kept tracking your -next tree.

No, subsystem maintainers are not allowed to break their trees like
this, unless something really major happens that requires it.

Again, it's been this way for years, and is one of the requirements of
subsystem maintainers.  If you want a "testing" branch, use a "testing"
branch, but don't cause problems on your "real" branch or problems will
happen.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-24 20:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-23 12:56 [PATCH] usb-core: Revert "usb-core: Remove Fix mes in file hcd.c" Sasha Levin
2014-07-23 16:49 ` Greg KH
2014-07-24 13:14   ` Sasha Levin
2014-07-24 16:04     ` Greg KH
2014-07-24 16:20       ` Sasha Levin
2014-07-24 20:56         ` Greg KH

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).