Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1155371pxu; Fri, 27 Nov 2020 00:40:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCxXCSj8b+Kz6dYeZz1wQABr4/hHUHpxafZl4IB3J4v/L8GscYCliBlb4eO2sCxW3rAT5r X-Received: by 2002:a50:8a8e:: with SMTP id j14mr6508993edj.87.1606466440031; Fri, 27 Nov 2020 00:40:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606466440; cv=none; d=google.com; s=arc-20160816; b=EgV3CG5OHLqj+Nu2Mau/s3OPsoerC2knZSkSolgKRjZB4K6JooprsHXUqYxnJYYeAW 2r1hwQR7HgSjCDfOCdJKTqRKCkTSlTuv4A1fmNXZ1kSkqwAMJNZ9toK5ABQTlpuvKMEB 17vZHIGbhH35rZDuTF/wQjVXEaddeI+9Z9pKfGT2ILvMyZs2lPGK7gpuiUV0xp+iTPJz uF2Ecm+97CA3YJeYdhkKd0r3m4ILsQ5VSiruRfMFDDE2ybKedIME8OhvO4SdT6/CvlbB 1DY340xPsVcy7sd/Z/TqojI+u8p+3jIonrvt4WVktJa1PGSG/uOut80Pxsoq6JwfhUbh jQ2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=OHU0uLzKqhNntOb28JbWE0OII+Zx2F3KXLp7TJVHtuo=; b=rFefrxqfc0ZuE+Y32Kwjt/vdA2XR5dS5r72jUMAMhMcWAv5i8mD5TSP6ydqRNrluut 7+G5mkk8hIHqmcoIy8eNqkTLGRKreBDF0LmhG/qWuTNP7Kn19BAY7w2xCweIYyc6u5uc BgBLHUSpukJuvUyDbu/NntGGZO+bGG+g4BZLoJYk2b+26QqyLILzJ9gE979AO/pE0Veu PKDLuKSBTNy1SPny2XizqC4/idemJHpWEoOmMO89ZDZzyKnLt/WfIu37j/s4R8nM62D9 l+hlsEYnqnNgDbefGmF6pv76cnqUQyoU/H+u629eoK+uFm2lNFAIVrma+dxnVMd/ToN7 Ayqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XkM536ph; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm4si4530128edb.294.2020.11.27.00.40.17; Fri, 27 Nov 2020 00:40:40 -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=@gmail.com header.s=20161025 header.b=XkM536ph; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405000AbgKZSOT (ORCPT + 99 others); Thu, 26 Nov 2020 13:14:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404838AbgKZSOS (ORCPT ); Thu, 26 Nov 2020 13:14:18 -0500 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81D25C0613D4; Thu, 26 Nov 2020 10:14:18 -0800 (PST) Received: by mail-ej1-x643.google.com with SMTP id o9so4175670ejg.1; Thu, 26 Nov 2020 10:14:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OHU0uLzKqhNntOb28JbWE0OII+Zx2F3KXLp7TJVHtuo=; b=XkM536phVMS/RzN86F8NayUyKPl+kGO+uJ7r9Eg7eQ1KefDMEsAmQtgCDJI2DtKBvO Vvm8yNuRDT7V8jQI/aTEeUstjkJWe5zu7DDta3twqJYhu8eD5GA3WmEmF2Fnfx1k6SMP jZhrdO3PW2hOMU/QJ+ooP0o838zysu+SayEA3ub1LMA6AwvecumtVtgjf0TmtmSMQY8Y He7RID2qPisEQN3Ck9UJFMtn8Gb66WREYAdh0LhA0/YqOSrMqx3Blttwnc+Eo90/1C8X BLDvnhUeDVCoutu4u2ljnyR5z0t5t5QWyKloswMeDWSojcfCwoJuvrKVfE0rjax1e+pR pN5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OHU0uLzKqhNntOb28JbWE0OII+Zx2F3KXLp7TJVHtuo=; b=N4aBVKhpqKSAp1RiFRG87PHMFyffEFSrcMeh50NTrgTNBoimTfw8hdRxcqz6BQGnwg N0lms3f+X9BAQCeRJO0tOThbDdH27boTGOEjLws4da1CWYfok5LIZDaJVLmSyJ+HPkKL /4tTXRjhoqz6VjeDVrm4JXHmPvOnsvNqAi3WI1SobVci9TV+pqqMiT/ohbXR3TdEvak0 ZF1hCDE7OJl6/hrUh0pxr9UnkR/WkaseHhsgdxtNod+ik/QZI4XMBYgQBTfjDPTUjP+c r9WS1QK2AM3HDOpfEdX4oRVVmNHTuLrIAe0M6Y/0dgzlzTb4HQnfZ91Pw3Q8qOE3oeYJ NTLg== X-Gm-Message-State: AOAM533R5a2NjbWNWsoEvckSBaIooboheDtrYzGmMTOl36c5PFqcJM/t dncQkvwvtEfdM/tiC8hH06s= X-Received: by 2002:a17:906:5c43:: with SMTP id c3mr4051769ejr.390.1606414457299; Thu, 26 Nov 2020 10:14:17 -0800 (PST) Received: from ?IPv6:2a01:110f:b59:fd00:385b:d58:7bd:b2fd? ([2a01:110f:b59:fd00:385b:d58:7bd:b2fd]) by smtp.gmail.com with ESMTPSA id h9sm3540346ejk.118.2020.11.26.10.14.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Nov 2020 10:14:16 -0800 (PST) Subject: Re: [PATCH v9 2/6] leds: flash: Fix multicolor registration no-ops by return 0 To: Gene Chen , pavel@ucw.cz, robh+dt@kernel.org, matthias.bgg@gmail.com Cc: dmurphy@ti.com, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, gene_chen@richtek.com, Wilma.Wu@mediatek.com, shufan_lee@richtek.com, cy_huang@richtek.com, benjamin.chao@mediatek.com References: <1606390654-6075-1-git-send-email-gene.chen.richtek@gmail.com> <1606390654-6075-3-git-send-email-gene.chen.richtek@gmail.com> From: Jacek Anaszewski Message-ID: Date: Thu, 26 Nov 2020 19:14:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <1606390654-6075-3-git-send-email-gene.chen.richtek@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Gene, On 11/26/20 12:37 PM, Gene Chen wrote: > From: Gene Chen > > Fix multicolor registration no-ops by return 0 > > Signed-off-by: Gene Chen > --- > include/linux/led-class-multicolor.h | 42 +++++++++++++----------------------- > 1 file changed, 15 insertions(+), 27 deletions(-) > > diff --git a/include/linux/led-class-multicolor.h b/include/linux/led-class-multicolor.h > index 5116f9a..210d57b 100644 > --- a/include/linux/led-class-multicolor.h > +++ b/include/linux/led-class-multicolor.h > @@ -44,12 +44,6 @@ int led_classdev_multicolor_register_ext(struct device *parent, > struct led_classdev_mc *mcled_cdev, > struct led_init_data *init_data); > > -static inline int led_classdev_multicolor_register(struct device *parent, > - struct led_classdev_mc *mcled_cdev) > -{ > - return led_classdev_multicolor_register_ext(parent, mcled_cdev, NULL); > -} > - > /** > * led_classdev_multicolor_unregister - unregisters an object of led_classdev > * class with support for multicolor LEDs > @@ -68,13 +62,6 @@ int devm_led_classdev_multicolor_register_ext(struct device *parent, > struct led_classdev_mc *mcled_cdev, > struct led_init_data *init_data); > > -static inline int devm_led_classdev_multicolor_register(struct device *parent, > - struct led_classdev_mc *mcled_cdev) > -{ > - return devm_led_classdev_multicolor_register_ext(parent, mcled_cdev, > - NULL); > -} > - > void devm_led_classdev_multicolor_unregister(struct device *parent, > struct led_classdev_mc *mcled_cdev); > #else > @@ -83,27 +70,33 @@ static inline int led_classdev_multicolor_register_ext(struct device *parent, > struct led_classdev_mc *mcled_cdev, > struct led_init_data *init_data) > { > - return -EINVAL; > -} > - > -static inline int led_classdev_multicolor_register(struct device *parent, > - struct led_classdev_mc *mcled_cdev) > -{ > - return led_classdev_multicolor_register_ext(parent, mcled_cdev, NULL); > + return 0; > } > > static inline void led_classdev_multicolor_unregister(struct led_classdev_mc *mcled_cdev) {}; > static inline int led_mc_calc_color_components(struct led_classdev_mc *mcled_cdev, > enum led_brightness brightness) > { > - return -EINVAL; > + return 0; > } > > static inline int devm_led_classdev_multicolor_register_ext(struct device *parent, > struct led_classdev_mc *mcled_cdev, > struct led_init_data *init_data) > { > - return -EINVAL; > + return 0; > +} > + > +static inline void devm_led_classdev_multicolor_unregister(struct device *parent, > + struct led_classdev_mc *mcled_cdev) > +{}; > + > +#endif /* IS_ENABLED(CONFIG_LEDS_CLASS_MULTICOLOR) */ > + > +static inline int led_classdev_multicolor_register(struct device *parent, > + struct led_classdev_mc *mcled_cdev) > +{ > + return led_classdev_multicolor_register_ext(parent, mcled_cdev, NULL); > } > > static inline int devm_led_classdev_multicolor_register(struct device *parent, > @@ -113,9 +106,4 @@ static inline int devm_led_classdev_multicolor_register(struct device *parent, > NULL); > } > > -static inline void devm_led_classdev_multicolor_unregister(struct device *parent, > - struct led_classdev_mc *mcled_cdev) > -{}; > - > -#endif /* IS_ENABLED(CONFIG_LEDS_CLASS_MULTICOLOR) */ > #endif /* _LINUX_MULTICOLOR_LEDS_H_INCLUDED */ > Here the same comment as for the patch 1/6. With that: Acked-by: Jacek Anaszewski -- Best regards, Jacek Anaszewski