Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp647280imw; Wed, 13 Jul 2022 05:38:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1soc89WlG7T/xCyo5MxkZDUGoUhfbGLTp+kK1y2D81aEgx2WCyBNrqKhDveGpevKb1IB1ft X-Received: by 2002:a17:90b:4d07:b0:1ef:521c:f051 with SMTP id mw7-20020a17090b4d0700b001ef521cf051mr10050847pjb.164.1657715935649; Wed, 13 Jul 2022 05:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657715935; cv=none; d=google.com; s=arc-20160816; b=Q8sdjx2dxnC9J7tNSvCqNAPCGWSVeJ7/ntCfxrJ5stYIZat5lbfmC/8PNBIlIwxzoQ v7Ken4jzGLBpkwIyt5XVl7ftRQqK5iopDkfkkqjJ1ykOJ3sVDfdNLtxACPRUe8ooQ96W uKID932NRUD5dRO8q+3WXFl+LerJeUBXigGt9E95YJtSYBRCkZn1zn1TjgBWLdXWiu4L GgtcrqQNpdYXGZtbI8sprVzS6XVzuUZrcxmlMk5uRMUgys36OA/ZPLoFUpylNINgEGwx HND6HrXIQtBa4c0z+wdtE5op7RQrJWIP4/SiDgw/WUoKoI2btPY++XvKVcPYcXmIJFyc YObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=H60c6BQz+0PUGxMp0vbXoiihGTO7ZBPYPm+08N4mLfI=; b=K+Zv5PtPIjYj7eeXqvLyFCTrwXvSA3B6kAWvkcopv4wb0ZPz2442PuKzGg+BfNEKKR JmEEqFPrFsoTuAxchpxQ8alMxrssQeSnWnGPE/klXDKRZw/RYOhvQWz6W4z9Tnh2Yi3Y Xc3GHixmkpJ7LhJe5VWLqOmx+xhC71l1XZeRxr9xXRkQxQr0wtqeyHpg7+NFH3Huufsn ude6b2A5yW/1vnFvV1R+6ikxPSFC4Zk+D+nnQI6m/uUOJs1tDIdTIp02YxRhnDjdrk9A 8M1bIg72WfFVqO9rb//X4oSh+O971xjy0sMc6yl9BlK5rgcQI4FAetQcYOqyLyfDqqGY FcUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cFwaO0bD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o19-20020a170903301300b0016c1a1bb2fasi14826029pla.569.2022.07.13.05.38.42; Wed, 13 Jul 2022 05:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cFwaO0bD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234824AbiGMMIF (ORCPT + 99 others); Wed, 13 Jul 2022 08:08:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236288AbiGMMH5 (ORCPT ); Wed, 13 Jul 2022 08:07:57 -0400 Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EA17104034; Wed, 13 Jul 2022 05:07:53 -0700 (PDT) Received: by mail-yb1-xb34.google.com with SMTP id e69so18909626ybh.2; Wed, 13 Jul 2022 05:07:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=H60c6BQz+0PUGxMp0vbXoiihGTO7ZBPYPm+08N4mLfI=; b=cFwaO0bDU4Rlt7N9UDqzRHYc/L/LXwPsecY5KlQfSKmfeHbUGfJju92GNvM+QXRy/A MfFCd9EiEFbUqGG0Dk3UDyeTjK2mKB+J26YUCLsjwjV1AqSW8ALXoZ+QUWDjp8FbHEeY dwnLTjlohJXN4MlqdlflbgJKO0LHlSOv3alwCbci2ARAUzjG69r4BZ9OGDCDuqQtQA7F 3fzpmlRGWBNYqAxA0gsKxiBlo4ApaOY7UboYG9JKS2cowDCyOJujzJrS984DN9KyXzOA PlokWUEqgVaq6a1qwFa+85+pBBg3DMQ+qHXOl22B3dO6jAPN+bwQ7BsHm3cmgJ/HPnXL vfmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=H60c6BQz+0PUGxMp0vbXoiihGTO7ZBPYPm+08N4mLfI=; b=Fivb87gLnZouIU5+jpNhiWYCJYnKwvrl08ZulwjqKwexabykfs5NmueHwoe9axfZiM WwgJ0XbWWxnl9f2Dr7hMUigRxHvlDBAtXjev0pmWh38OHPFq3aPJmrOASOnk+FlzZm+2 vRvb31GLWQxYLclInHmG5SXdolALn2TDcuE6TSswJfLi/gM9hWQhJ4cC4bFb1RYAfZnc QpF/YFQitOwkM2PKC/EzIy89TucBS7SBD/zMYiB/kQ/GJLpOu+qNt8GkyLtCgfXFE9NI +Ke+iAQMSaOzLWoM245iH/95uA5lup89eI9NKsAjxy3F/xP4Hn5xDPlxk8SWKw39Aar5 JuuQ== X-Gm-Message-State: AJIora+CSYWjUY8C4JxXpsIHgbUraLYgkFMLHQ3Sckf5ZK4tS2EQ4WEl gUZbCPGR3ntZUUCQeVmB9KdqlYB2EZhuTxS094g= X-Received: by 2002:a25:858e:0:b0:66e:4898:63e2 with SMTP id x14-20020a25858e000000b0066e489863e2mr3559399ybk.296.1657714072552; Wed, 13 Jul 2022 05:07:52 -0700 (PDT) MIME-Version: 1.0 References: <20220704053901.728-1-peterwu.pub@gmail.com> <20220704053901.728-14-peterwu.pub@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Wed, 13 Jul 2022 14:07:15 +0200 Message-ID: Subject: Re: [PATCH v4 13/13] video: backlight: mt6370: Add Mediatek MT6370 support To: ChiaEn Wu Cc: Lee Jones , Daniel Thompson , Jingoo Han , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sebastian Reichel , Chunfeng Yun , Greg Kroah-Hartman , Jonathan Cameron , Lars-Peter Clausen , Liam Girdwood , Mark Brown , Guenter Roeck , "Krogerus, Heikki" , Helge Deller , ChiaEn Wu , Alice Chen , cy_huang , dri-devel , Linux LED Subsystem , devicetree , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List , Linux PM , USB , linux-iio , "open list:FRAMEBUFFER LAYER" , szuni chen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 13, 2022 at 12:53 PM ChiaEn Wu wrote: > Andy Shevchenko =E6=96=BC 2022=E5=B9=B47=E6= =9C=885=E6=97=A5 =E9=80=B1=E4=BA=8C =E6=B8=85=E6=99=A85:14=E5=AF=AB=E9=81= =93=EF=BC=9A > > On Mon, Jul 4, 2022 at 7:43 AM ChiaEn Wu wrote: Please, remove unneeded context when replying! ... > > > + brightness_val[0] =3D (brightness - 1) & MT6370_BL_DI= M2_MASK; > > > + brightness_val[1] =3D (brightness - 1) > > > + >> fls(MT6370_BL_DIM2_MASK); > > > > Bad indentation. One line? > > Well... if indent to one line, it will be over 80 characters(or called co= lumns?) > From my understanding, it is not allowed, right?? It's allowed to some extent.Use your common sense. Here it's obviously broken indentation. ... > > > + prop_val =3D (ilog2(roundup_pow_of_two(prop_val)) + 1= ) >> 1; > > > > Isn't something closer to get_order() or fls()? > > I will revise it to "(get_order(prop_va * PAGE_SIZE) + 1) / 2" and > this change is meet your expectations?? Nope. Try again. What about fls()? ... > > > + props->max_brightness =3D min_t(u32, brightness, > > > + MT6370_BL_MAX_BRIGHTNESS); > > > > One line? > > Ditto, it will be over 80 characters... As per above. --=20 With Best Regards, Andy Shevchenko