linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, "Ronald Tschalär" <ronald@innovation.ch>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Henrik Rydberg <rydberg@bitmath.org>,
	linux-kernel@vger.kernel.org, Lukas Wunner <lukas@wunner.de>,
	Federico Lorenzi <federico@travelground.com>,
	kbuild-all@01.org, linux-input@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH 2/2] Input: add Apple SPI keyboard and trackpad driver.
Date: Tue, 5 Feb 2019 13:21:10 +0300	[thread overview]
Message-ID: <20190205102110.GG2581@kadam> (raw)
In-Reply-To: <20190204081947.25152-3-ronald@innovation.ch>

Hi Ronald,

Thank you for the patch! Perhaps something to improve:

url:    https://github.com/0day-ci/linux/commits/Ronald-Tschal-r/drm-bridge-sil_sii8620-depend-on-INPUT-instead-of-selecting-it/20190205-003319
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next

smatch warnings:
drivers/input/keyboard/applespi.c:1551 applespi_get_saved_bl_level() warn: returning -1 instead of -ENOMEM is sloppy

# https://github.com/0day-ci/linux/commit/cfa9f37054a5b21113aa8b00c455275145114f8e
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout cfa9f37054a5b21113aa8b00c455275145114f8e
vim +1551 drivers/input/keyboard/applespi.c

cfa9f3705 Ronald Tschalär 2019-02-04  1541  
cfa9f3705 Ronald Tschalär 2019-02-04  1542  static int applespi_get_saved_bl_level(void)
cfa9f3705 Ronald Tschalär 2019-02-04  1543  {
cfa9f3705 Ronald Tschalär 2019-02-04  1544  	struct efivar_entry *efivar_entry;
cfa9f3705 Ronald Tschalär 2019-02-04  1545  	u16 efi_data = 0;
cfa9f3705 Ronald Tschalär 2019-02-04  1546  	unsigned long efi_data_len;
cfa9f3705 Ronald Tschalär 2019-02-04  1547  	int sts;
cfa9f3705 Ronald Tschalär 2019-02-04  1548  
cfa9f3705 Ronald Tschalär 2019-02-04  1549  	efivar_entry = kmalloc(sizeof(*efivar_entry), GFP_KERNEL);
cfa9f3705 Ronald Tschalär 2019-02-04  1550  	if (!efivar_entry)
cfa9f3705 Ronald Tschalär 2019-02-04 @1551  		return -1;
cfa9f3705 Ronald Tschalär 2019-02-04  1552  
cfa9f3705 Ronald Tschalär 2019-02-04  1553  	memcpy(efivar_entry->var.VariableName, EFI_BL_LEVEL_NAME,
cfa9f3705 Ronald Tschalär 2019-02-04  1554  	       sizeof(EFI_BL_LEVEL_NAME));
cfa9f3705 Ronald Tschalär 2019-02-04  1555  	efivar_entry->var.VendorGuid = EFI_BL_LEVEL_GUID;
cfa9f3705 Ronald Tschalär 2019-02-04  1556  	efi_data_len = sizeof(efi_data);
cfa9f3705 Ronald Tschalär 2019-02-04  1557  
cfa9f3705 Ronald Tschalär 2019-02-04  1558  	sts = efivar_entry_get(efivar_entry, NULL, &efi_data_len, &efi_data);
cfa9f3705 Ronald Tschalär 2019-02-04  1559  	if (sts && sts != -ENOENT)
cfa9f3705 Ronald Tschalär 2019-02-04  1560  		pr_warn("Error getting backlight level from EFI vars: %d\n",
cfa9f3705 Ronald Tschalär 2019-02-04  1561  			sts);
cfa9f3705 Ronald Tschalär 2019-02-04  1562  
cfa9f3705 Ronald Tschalär 2019-02-04  1563  	kfree(efivar_entry);
cfa9f3705 Ronald Tschalär 2019-02-04  1564  
cfa9f3705 Ronald Tschalär 2019-02-04  1565  	return efi_data;
cfa9f3705 Ronald Tschalär 2019-02-04  1566  }
cfa9f3705 Ronald Tschalär 2019-02-04  1567  

  parent reply	other threads:[~2019-02-05 10:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04  8:19 [PATCH 0/2] Add Apple SPI keyboard and trackpad driver Ronald Tschalär
2019-02-04  8:19 ` [PATCH 1/2] drm/bridge: sil_sii8620: depend on INPUT instead of selecting it Ronald Tschalär
2019-02-04  8:19 ` [PATCH 2/2] Input: add Apple SPI keyboard and trackpad driver Ronald Tschalär
2019-02-04 18:20   ` kbuild test robot
2019-02-04 18:44   ` kbuild test robot
2019-02-05 10:21   ` Dan Carpenter [this message]
2019-02-05 13:15     ` Life is hard, and then you die
2019-02-05 11:45   ` Andy Shevchenko
2019-02-05 13:18     ` Life is hard, and then you die
2019-02-05 15:32       ` Andy Shevchenko
2019-02-06 20:22   ` Andy Shevchenko
2019-02-10 11:18     ` Life is hard, and then you die
2019-02-16  0:44       ` Andy Shevchenko
2019-02-18  9:08         ` Life is hard, and then you die
2019-02-18 12:00           ` Andy Shevchenko
2019-02-04 20:47 ` [PATCH 0/2] Add " Henrik Rydberg
2019-02-05 13:14   ` Life is hard, and then you die

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=20190205102110.GG2581@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=federico@travelground.com \
    --cc=kbuild-all@01.org \
    --cc=kbuild@01.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=ronald@innovation.ch \
    --cc=rydberg@bitmath.org \
    /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;
as well as URLs for NNTP newsgroup(s).