All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Penkler <dpenkler@gmail.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: gpib: Make static and reduce forward declarations
Date: Wed, 22 Jan 2025 11:32:41 +0100	[thread overview]
Message-ID: <Z5DJSQUkEsLuzcke@egonzo> (raw)
In-Reply-To: <6889992d-043d-4af8-869a-84eea9609148@stanley.mountain>

On Wed, Jan 22, 2025 at 10:37:33AM +0300, Dan Carpenter wrote:
> On Tue, Jan 21, 2025 at 09:33:42PM +0100, Dave Penkler wrote:
> > Declaring the entry points as static caused a warning that the
> > serial_poll_status function of the agilent_82350b driver was
> > unused.
> > 
> > Add the entry point to the corresponding interface structure
> > initializations where it was missing.
> 
> ...
> 
> > @@ -842,6 +824,7 @@ static gpib_interface_t agilent_82350b_unaccel_interface = {
> >  	.primary_address = agilent_82350b_primary_address,
> >  	.secondary_address = agilent_82350b_secondary_address,
> >  	.serial_poll_response = agilent_82350b_serial_poll_response,
> > +	.serial_poll_status = agilent_82350b_serial_poll_status,
> >  	.t1_delay = agilent_82350b_t1_delay,
> >  	.return_to_local = agilent_82350b_return_to_local,
> >  };
> > @@ -869,12 +852,12 @@ static gpib_interface_t agilent_82350b_interface = {
> >  	.primary_address = agilent_82350b_primary_address,
> >  	.secondary_address = agilent_82350b_secondary_address,
> >  	.serial_poll_response = agilent_82350b_serial_poll_response,
> > +	.serial_poll_status = agilent_82350b_serial_poll_status,
> >  	.t1_delay = agilent_82350b_t1_delay,
> >  	.return_to_local = agilent_82350b_return_to_local,
> >  };
> 
> So what happened is that Sparse was complaining and you were cleaning
> up the code and you discovered this bug.  Fine.  But bug fixes need to
> be in their own commit, not hidden inside a giant cleanup patch.  They
> need to have a commit message.
> 
> Quite often it sucks to discover a bug like this because the bugs have
> to be fixed first before the cleanup.  We're a bit less strict on this
> in staging because realistically there are lots of bugs and lots of
> cleanups and they're going to get mixed together.  But other subsystems
> maintain a fixes branch and a new development branch and so bug fixes
> have to apply cleanly to the fixes branch.
> 
> So in that case you would need to save the diff of the cleanup.  Go back
> to the start.  Write the fix.  Apply the cleanup diff on the top.  Deal
> with any failed chunks.  What a headache!  I get that.  And you're from
> a gmail.com address so I don't even know if you're getting paid to deal
> with this crap...
> 
> Quite often it sucks but in this case, it's really easy.  Use
> `git citool`, highlight the bugfix lines, right click, add to commit
> write a commit message and done.  Make sure it still builds as a stand
> alone patch, though.  Quite often when I try to highlight and click on
> all the lines in a bugfix, I accidentally leave out essential pieces.
> 
> regards,
> dan carpenter
> 
OK I will send a new patch set splitting the patch as you suggested.
Thanks,
-dave

      parent reply	other threads:[~2025-01-22 10:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-21 20:33 [PATCH] staging: gpib: Make static and reduce forward declarations Dave Penkler
2025-01-22  7:37 ` Dan Carpenter
2025-01-22  7:44   ` Dan Carpenter
2025-01-22 10:32   ` Dave Penkler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z5DJSQUkEsLuzcke@egonzo \
    --to=dpenkler@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.