All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>,
	Vitaly Lubart <vitaly.lubart@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [char-misc-next] mei: gsc_proxy: add gsc proxy driver
Date: Fri, 23 Dec 2022 08:16:53 +0100	[thread overview]
Message-ID: <Y6VV5d/V4MKDz2Te@kroah.com> (raw)
In-Reply-To: <20221222220214.3688774-1-tomas.winkler@intel.com>

On Fri, Dec 23, 2022 at 12:02:14AM +0200, Tomas Winkler wrote:
> From: Alexander Usyskin <alexander.usyskin@intel.com>
> 
> Add GSC proxy driver. It to allows messaging between GSC component
> on Intel on board graphics card and CSME device.
> GSC and MEI
> 
> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> ---
>  MAINTAINERS                                |   2 +-
>  drivers/misc/mei/Kconfig                   |   1 +
>  drivers/misc/mei/Makefile                  |   1 +
>  drivers/misc/mei/gsc_proxy/Kconfig         |  13 ++
>  drivers/misc/mei/gsc_proxy/Makefile        |   7 +
>  drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c | 205 +++++++++++++++++++++

Why a whole new subdirectory for a tiny 200 line file?

> +static int mei_gsc_proxy_component_match(struct device *dev, int subcomponent, void *data)
> +{
> +	struct device *base = data;
> +
> +	if (!dev || !dev->driver ||
> +	    strcmp(dev->driver->name, "i915") ||

I thought I had objected to this "let's poke around in a driver name for
a magic value" logic in the past.  How do you know this is always going
to work?

> +	    subcomponent != I915_COMPONENT_GSC_PROXY)
> +		return 0;
> +
> +	base = base->parent;
> +	if (!base) /* mei device */
> +		return 0;

How can a device not have a parent?

> +
> +	base = base->parent; /* pci device */

You don't know this is a pci device :(

If it is, then pass in a REAL pci device structure please.

> +
> +	dev = dev->parent;
> +	return (base && dev && dev == base);

I do not understand this statement at all, what are you doing here?

confused,

greg k-h

  parent reply	other threads:[~2022-12-23  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 22:02 [char-misc-next] mei: gsc_proxy: add gsc proxy driver Tomas Winkler
2022-12-23  1:42 ` kernel test robot
2022-12-23  7:16 ` Greg Kroah-Hartman [this message]
2022-12-28 11:46   ` Usyskin, Alexander
2023-01-19 16:20     ` Greg Kroah-Hartman
2023-01-24 21:05       ` Winkler, Tomas
2023-01-27  9:07         ` Greg Kroah-Hartman

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=Y6VV5d/V4MKDz2Te@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.usyskin@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomas.winkler@intel.com \
    --cc=vitaly.lubart@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 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.