lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANq1E4SYvLAhH3WqGNCZBrxwd8RiwL-wH90tZP9Je1doDxvhXQ@mail.gmail.com>
Date:	Wed, 12 Feb 2014 11:30:48 +0100
From:	David Herrmann <dh.herrmann@...il.com>
To:	Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc:	Benjamin Tissoires <benjamin.tissoires@...il.com>,
	Jiri Kosina <jkosina@...e.cz>,
	"open list:HID CORE LAYER" <linux-input@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 05/14] HID: i2c-hid: use generic .request() implementation

Hi

On Mon, Feb 10, 2014 at 6:58 PM, Benjamin Tissoires
<benjamin.tissoires@...hat.com> wrote:
> Having our own .request() implementation does not give anything,
> so use the generic binding.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>
> ---
>  drivers/hid/i2c-hid/i2c-hid.c | 31 -------------------------------
>  1 file changed, 31 deletions(-)
>
> diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
> index 07a054a..925fb8d 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -632,36 +632,6 @@ static int i2c_hid_raw_request(struct hid_device *hid, unsigned char reportnum,
>         }
>  }
>
> -static void i2c_hid_request(struct hid_device *hid, struct hid_report *rep,
> -               int reqtype)
> -{
> -       struct i2c_client *client = hid->driver_data;
> -       char *buf;
> -       int ret;
> -       int len = i2c_hid_get_report_length(rep) - 2;
> -
> -       buf = kzalloc(len, GFP_KERNEL);

Haven't you recently fixed this to use hid_alloc_buffer()? Anyhow,
patch obviously looks good:

Reviewed-by: David Herrmann <dh.herrmann@...il.com>

Thanks
David

> -       if (!buf)
> -               return;
> -
> -       switch (reqtype) {
> -       case HID_REQ_GET_REPORT:
> -               ret = i2c_hid_get_raw_report(hid, rep->id, buf, len, rep->type);
> -               if (ret < 0)
> -                       dev_err(&client->dev, "%s: unable to get report: %d\n",
> -                               __func__, ret);
> -               else
> -                       hid_input_report(hid, rep->type, buf, ret, 0);
> -               break;
> -       case HID_REQ_SET_REPORT:
> -               hid_output_report(rep, buf);
> -               i2c_hid_output_raw_report(hid, buf, len, rep->type, true);
> -               break;
> -       }
> -
> -       kfree(buf);
> -}
> -
>  static int i2c_hid_parse(struct hid_device *hid)
>  {
>         struct i2c_client *client = hid->driver_data;
> @@ -817,7 +787,6 @@ static struct hid_ll_driver i2c_hid_ll_driver = {
>         .open = i2c_hid_open,
>         .close = i2c_hid_close,
>         .power = i2c_hid_power,
> -       .request = i2c_hid_request,
>         .output_report = i2c_hid_output_report,
>         .raw_request = i2c_hid_raw_request,
>  };
> --
> 1.8.3.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ