Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp580671pxu; Fri, 11 Dec 2020 09:11:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+3MOEQ3lajV8Inc/O+2vQSU/0UOYH/ykoBE6n5CC9xZOnfh5QoORJwfhcLcH01VTADJa6 X-Received: by 2002:a17:906:cc9c:: with SMTP id oq28mr1495557ejb.224.1607706715174; Fri, 11 Dec 2020 09:11:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607706715; cv=none; d=google.com; s=arc-20160816; b=FpS9Ez8BfgjYtWaq9RlbdJjgKfd+83bUQb7NlCLRqJf38qS+l/8ssfjtlXGBtEM/kn mTweAiVcm6Y3YsOQj7WzANRAA0nhLE4e62CL7gqUNGEon4Pa6o8gJkPtI2ReZf0rOlG4 0UCZc4pPae9JMDr3AK3EMN0aM4euFQn96o5e/pNFctaSYikjnSP6o8xtlCzAWTgQBrDC jWR6mousG9W+I3qN++FbE8VSoz7a7WOZSN+1mmj0Fi/MMAdldc+/1Xh2Lb/4lQWSP6GW uhpZQ/TOK/T1foNOTzW6WQUwlH0CLh6UUxqSuuGQu1Pwh0PTTPYNPwCnLczVIWBh9q26 5qrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=xr6Z23Z0FVsd7BuiRTbopmb2GJbxCWmY7QdOHsv0WHQ=; b=lIvhT+wx2miw1THbHk1BkkjkzmEi55GOEevSxudmy8rGa8XKF4GXp97528ueMHm8s+ MaRggrbJGqqoeKof1uu1EBl2lifsSvq50A6wWvP9SkayL2S/p2Tc0zEOgpBRfZgLuQnM 5JGy3iR7CAXvrFSFE7xi6ieZ2qrmdNlvB22SH49NJQEbrfNLE49hUm+yAkA/wEQNQnhM Vgu0qVj8GJ/dJIrZ9QVfcw+YeCY+wPy2l1odrDmm8r6u9Q9LCeaZRAOBFpNHCMzh53ry R3D6u/PNc5sQXBXAMsn+HJfzK21bpl1Vmu9weWw47FIPNSQb5gXp1MAEVRX0RM3LwFOJ iVAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nic.cz header.s=default header.b=FjFqw9rZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zh12si4897046ejb.148.2020.12.11.09.11.31; Fri, 11 Dec 2020 09:11:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nic.cz header.s=default header.b=FjFqw9rZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406049AbgLKM6q (ORCPT + 99 others); Fri, 11 Dec 2020 07:58:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405977AbgLKM62 (ORCPT ); Fri, 11 Dec 2020 07:58:28 -0500 Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A257AC0613D3; Fri, 11 Dec 2020 04:57:47 -0800 (PST) Received: from localhost (unknown [172.20.6.135]) by mail.nic.cz (Postfix) with ESMTPSA id 8EC22140A85; Fri, 11 Dec 2020 13:57:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1607691464; bh=XxSgouCReAfpmA+hWhEGm9ZmSmoHdWCMFQka3gjL/kM=; h=Date:From:To; b=FjFqw9rZqhlsyqZt9b85eyrq+HFUp5ZRDNZF5RBckv7qQebzAaIDM2aWttAWWvgOm WwDHDTPqrMIVN3td27fCw42NxypjbqNsq86+eAA+I0wZofzIfjpif2PQ/5oa2lavjF gOX/sw/OtwTC68MkaWpYALK89qtD/Hs3TlQLxhqA= Date: Fri, 11 Dec 2020 13:56:28 +0100 From: Marek Behun To: Abanoub Sameh Cc: pavel@ucw.cz, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Abanoub Sameh , kernel test robot Subject: Re: [PATCH] leds: led-core: Get rid of enum led_brightness Message-ID: <20201211135628.1fe1af79@nic.cz> In-Reply-To: <20201211014840.1554095-1-abanoubsameh@protonmail.com> References: <20201211014840.1554095-1-abanoubsameh@protonmail.com> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-100.0 required=5.9 tests=SHORTCIRCUIT, USER_IN_WELCOMELIST,USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Dec 2020 03:48:40 +0200 Abanoub Sameh wrote: > This gets rid of enum led_brightness in the main led files, > because it is deprecated, and an int can be used instead, > or maybe even a uint8_t since it only goes up to 255. > Next we can also patch the other files to get rid of it completely. 1. unsigned int should be used IMO - using int may force all implementers to check for negative value and return -EINVAL, which is stupid - some LED controllers may offer more than 8bit brightness value, so no uint8_t 2. I think we should remove all usages with one commit Marek