public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Cc: Abhishek Pandit-Subedi <abhishekpandit@google.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	linux-usb@vger.kernel.org, jthies@google.com,
	pmalani@chromium.org,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Rajaram Regupathy <rajaram.regupathy@intel.com>,
	Saranya Gopal <saranya.gopal@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] usb: typec: ucsi: Update connector cap and status
Date: Thu, 25 Jan 2024 17:50:54 -0800	[thread overview]
Message-ID: <2024012555-nuclear-chummy-6079@gregkh> (raw)
In-Reply-To: <CANFp7mWzA5df9iFpCWFRpXuOP06yDmBehYDYNACjrW2fPvp_Ow@mail.gmail.com>

On Thu, Jan 25, 2024 at 04:21:47PM -0800, Abhishek Pandit-Subedi wrote:
> On Thu, Jan 25, 2024 at 3:03 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Wed, Jan 24, 2024 at 04:44:53PM -0800, Abhishek Pandit-Subedi wrote:
> > > diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h
> > > index bec920fa6b8a..94b373378f63 100644
> > > --- a/drivers/usb/typec/ucsi/ucsi.h
> > > +++ b/drivers/usb/typec/ucsi/ucsi.h
> > > @@ -3,6 +3,7 @@
> > >  #ifndef __DRIVER_USB_TYPEC_UCSI_H
> > >  #define __DRIVER_USB_TYPEC_UCSI_H
> > >
> > > +#include <asm-generic/unaligned.h>
> >
> > Do you really need to include a asm/ include file?  This feels very
> > wrong.
> 
> I didn't see any header in include/linux that already had these
> unaligned access functions so I opted to include
> asm-generic/unaligned.h. Is there a reason not to use an asm/ include
> file?

Yes, you should never need to include a asm/ file, unless you are
arch-specific code.

But the big issue is that you don't really need this, right?

> > It's also in the wrong place, AND why "asm-generic"?  That also feels
> > wrong.
> 
> asm-generic is definitely wrong; I misunderstood how these headers are
> supposed to be used (should be just asm/unaligned.h).

Why?  What are you requiring this .h file for?

> For ordering, I took a look at some other files and it looks like
> <asm/...> goes below the <linux/...> includes. This also probably
> deserves documenting in the style guide.

It is somewhere, checkpatch should complain about it.

thanks,

greg k-h

  reply	other threads:[~2024-01-26  1:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25  0:44 [PATCH v2 0/3] usb: typec: ucsi: Adding support for UCSI 3.0 Abhishek Pandit-Subedi
2024-01-25  0:44 ` [PATCH v2 1/3] usb: typec: ucsi: Limit read size on v1.2 Abhishek Pandit-Subedi
2024-01-25  0:44 ` [PATCH v2 2/3] usb: typec: ucsi: Update connector cap and status Abhishek Pandit-Subedi
2024-01-25 23:03   ` Greg Kroah-Hartman
2024-01-26  0:21     ` Abhishek Pandit-Subedi
2024-01-26  1:50       ` Greg Kroah-Hartman [this message]
2024-01-26 18:08         ` Abhishek Pandit-Subedi
2024-01-26 18:30           ` Greg Kroah-Hartman
2024-01-26 18:37             ` Abhishek Pandit-Subedi
2024-02-08 19:48   ` Jameson Thies
2024-02-09  4:35     ` Abhishek Pandit-Subedi
2024-01-25  0:44 ` [PATCH v2 3/3] usb: typec: ucsi: Get PD revision for partner Abhishek Pandit-Subedi

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=2024012555-nuclear-chummy-6079@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=abhishekpandit@chromium.org \
    --cc=abhishekpandit@google.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jthies@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=pmalani@chromium.org \
    --cc=rajaram.regupathy@intel.com \
    --cc=saranya.gopal@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox