Re: [PATCH v4 20/21] firmware: qcom_scm: Refactor code to support multiple download mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 30, 2023 at 8:25 AM Pavan Kondeti <quic_pkondeti@xxxxxxxxxxx> wrote:
> On Wed, Jun 28, 2023 at 06:04:47PM +0530, Mukesh Ojha wrote:

...

> > +static int set_download_mode(const char *val, const struct kernel_param *kp)
> > +{
> > +     u32 old = download_mode;
> > +     int ret;
> > +
> > +     ret = sysfs_match_string(download_mode_name, val);
> > +     if (ret < 0) {

> > +             download_mode = old;

Why is this old variable needed at all?

> > +             pr_err("qcom_scm: unknown download mode: %s\n", val);
> > +             return -EINVAL;
> > +     }
>
> minor nit: %s/-EINVAL/ret
>
> > +     download_mode = ret;
> > +     if (__scm)
> > +             qcom_scm_set_download_mode(download_mode);
> > +
> > +     return 0;
> > +}


-- 
With Best Regards,
Andy Shevchenko




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux