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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190205102110.GG2581@kadam>
Date:   Tue, 5 Feb 2019 13:21:10 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...org,
        Ronald Tschalär <ronald@...ovation.ch>
Cc:     kbuild-all@...org, Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Henrik Rydberg <rydberg@...math.org>,
        Lukas Wunner <lukas@...ner.de>,
        Federico Lorenzi <federico@...velground.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] Input: add Apple SPI keyboard and trackpad driver.

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  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ