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]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux