From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D966C43219 for ; Wed, 1 May 2019 12:19:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2AD482054F for ; Wed, 1 May 2019 12:19:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="eLlCOI2g" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726413AbfEAMTF (ORCPT ); Wed, 1 May 2019 08:19:05 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:58058 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbfEAMTF (ORCPT ); Wed, 1 May 2019 08:19:05 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x41CInFW030028; Wed, 1 May 2019 07:18:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1556713129; bh=9aQOi45c/EGVag76udV6doM0PRwWmZo9EP9zOsTY0/k=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=eLlCOI2gErzAP1SeQMBk3RLC8bHUw3IqTNbW7qY1aCEy6pK/EspZStjcFEV/8hlTj 9MmJn6ftIpzYuNa6jhRILkZRkVrg5phmQwqRYCZyyWRtcmOMkcUYiX4r58Uv+T37Qr XOVNJracOfkqDKbYB/ZNLiQplBY6IzhY389B1/XY= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x41CIngO040408 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 1 May 2019 07:18:49 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 1 May 2019 07:18:49 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 1 May 2019 07:18:48 -0500 Received: from [10.250.90.63] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x41CImd7003631; Wed, 1 May 2019 07:18:48 -0500 Subject: Re: [PATCH v3 3/3] backlight: lm3630a: add firmware node support To: Pavel Machek CC: Brian Masney , , , , , , , , , , , , , References: <20190415072905.2861-1-masneyb@onstation.org> <20190415072905.2861-4-masneyb@onstation.org> <0e5e26ba-cf98-913e-8e76-e988a86dc0d1@ti.com> <20190501082627.GA2971@amd> From: Dan Murphy Message-ID: Date: Wed, 1 May 2019 07:18:52 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190501082627.GA2971@amd> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pavel On 5/1/19 3:26 AM, Pavel Machek wrote: > Hi! > >>> @@ -396,13 +506,20 @@ static int lm3630a_probe(struct i2c_client *client, >>> GFP_KERNEL); >>> if (pdata == NULL) >>> return -ENOMEM; >>> + >>> /* default values */ >>> - pdata->leda_ctrl = LM3630A_LEDA_ENABLE; >>> - pdata->ledb_ctrl = LM3630A_LEDB_ENABLE; >>> + pdata->leda_ctrl = LM3630A_LEDA_DISABLE; >>> + pdata->ledb_ctrl = LM3630A_LEDB_DISABLE; >> >> This is not needed since default is disabled and kzalloc will set these to 0 > > Let compiler do this kind of optimalizations. Code makes sense as-is. > Yes the code makes sense but it is unnecessary. Dan > Pavel >