public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Gupta, Nipun" <nipun.gupta@amd.com>
Cc: linux-kernel@vger.kernel.org, git@amd.com,
	pieter.jansen-van-vuuren@amd.com, nikhil.agarwal@amd.com,
	michal.simek@amd.com, abhijit.gangurde@amd.com
Subject: Re: [PATCH] cdx: add support for bus mastering
Date: Wed, 19 Jul 2023 15:36:15 +0200	[thread overview]
Message-ID: <2023071939-delegator-kebab-51b8@gregkh> (raw)
In-Reply-To: <f5b7216c-8e6f-16c4-6902-dc8a04997fb9@amd.com>

On Wed, Jul 19, 2023 at 06:06:40PM +0530, Gupta, Nipun wrote:
> 
> 
> On 7/18/2023 7:16 PM, Greg KH wrote:
> > On Tue, Jul 18, 2023 at 03:36:51PM +0530, Nipun Gupta wrote:
> > > Introduce cdx_set_master() and cdx_clear_master() APIs
> > > to support enable and disable of bus mastering. Drivers
> > > need to use these APIs to enable/disable DMAs from the
> > > CDX devices.
> > 
> > You do have a full 72 columns, why not use that?
> 
> sure, will update accordingly.
> 
> > 
> > > Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
> > > Reviewed-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
> > > ---
> > >   drivers/cdx/cdx.c                       | 32 ++++++++++++++
> > >   drivers/cdx/controller/cdx_controller.c |  4 ++
> > >   drivers/cdx/controller/mcdi_functions.c | 57 +++++++++++++++++++++++++
> > >   drivers/cdx/controller/mcdi_functions.h | 13 ++++++
> > >   include/linux/cdx/cdx_bus.h             | 16 +++++++
> > >   5 files changed, 122 insertions(+)
> > > 
> > > diff --git a/drivers/cdx/cdx.c b/drivers/cdx/cdx.c
> > > index d2cad4c670a0..efb24672b7d9 100644
> > > --- a/drivers/cdx/cdx.c
> > > +++ b/drivers/cdx/cdx.c
> > > @@ -182,6 +182,38 @@ cdx_match_id(const struct cdx_device_id *ids, struct cdx_device *dev)
> > >   	return NULL;
> > >   }
> > > +int cdx_set_master(struct cdx_device *cdx_dev)
> > > +{
> > > +	struct cdx_controller *cdx = cdx_dev->cdx;
> > > +	struct cdx_device_config dev_config;
> > > +	int ret;
> > > +
> > > +	dev_config.type = CDX_DEV_BUS_MASTER_CONF;
> > > +	dev_config.bme = true;
> > 
> > What is "bme"?
> 
> This is bus master enable. I will add a comment on the structure definition.

Better yet, spell it out "bus_master_enable" so no one has to look up
the comment, no need to try to make cryptic variable names :)

thanks,

greg k-h

      reply	other threads:[~2023-07-19 13:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 10:06 [PATCH] cdx: add support for bus mastering Nipun Gupta
2023-07-18 13:46 ` Greg KH
2023-07-19 12:36   ` Gupta, Nipun
2023-07-19 13:36     ` Greg KH [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=2023071939-delegator-kebab-51b8@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=abhijit.gangurde@amd.com \
    --cc=git@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=nikhil.agarwal@amd.com \
    --cc=nipun.gupta@amd.com \
    --cc=pieter.jansen-van-vuuren@amd.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