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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200914123444.GE4821@sirena.org.uk>
Date:   Mon, 14 Sep 2020 13:34:44 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Henry Chen <henryc.chen@...iatek.com>
Cc:     Georgi Djakov <georgi.djakov@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Viresh Kumar <vireshk@...nel.org>,
        Stephen Boyd <swboyd@...omium.org>,
        Ryan Case <ryandcase@...omium.org>,
        Mark Rutland <mark.rutland@....com>,
        Nicolas Boichat <drinkcat@...gle.com>,
        Fan Chen <fan.chen@...iatek.com>,
        James Liao <jamesjj.liao@...iatek.com>,
        Arvin Wang <arvin.wang@...iatek.com>,
        Mike Turquette <mturquette@...aro.org>,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH V5 15/17] regulator: Regulator driver for the Mediatek
 DVFSRC

On Mon, Sep 14, 2020 at 11:04:42AM +0800, Henry Chen wrote:

> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2019 MediaTek Inc.
> + */

Please make the entire comment a C++ one so things look more
intentional, and are you sure about that copyright date?

> +static int dvfsrc_set_voltage_sel(struct regulator_dev *rdev,
> +				  unsigned int selector)
> +{
> +	struct device *dvfsrc_dev = to_dvfsrc_dev(rdev);
> +	int id = rdev_get_id(rdev);
> +
> +	switch (id) {
> +	case DVFSRC_ID_VCORE:
> +		mtk_dvfsrc_send_request(dvfsrc_dev,
> +					MTK_DVFSRC_CMD_VCORE_REQUEST,
> +					selector);
> +	break;
> +	case DVFSRC_ID_VSCP:
> +		mtk_dvfsrc_send_request(dvfsrc_dev,
> +					MTK_DVFSRC_CMD_VSCP_REQUEST,
> +					selector);
> +	break;

Just have two separate operations rather than the switch statement, and
where you do have switch statements please follow the kernel coding
style.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ