Re: [PATCH 04/15] pcmcia: synclink_cs: remove dead paranoia_check, warn for missing line

Andy Shevchenko
2022-10-27T04:54:20Z

On Thu, Oct 27, 2022 at 1:42 AM наб <nabijaczleweli@nabijaczleweli.xyz> wrote:
>
> MGSLPC_PARANOIA_CHECK has never been defined automatically,
> and devices with null driver_info can't happen, since we reject the open
> in that case
>
> Move the log statement from dead code to the check,
> and log the state inconsistency like we do above for the line count
> ("invalid line #%d.")

Please, respect English grammar and punctuation, in particular don't
forget the trailing periods.

...

> + if (!info) {
> + printk(KERN_WARNING "%s(%d):mgslpc_open: "
> + "no device for line #%d.\n",
> + __FILE__, __LINE__, line);

Even though the old code uses this awkward style for messages, please
follow the modern one, i.e.

pr_warn("mgslpc_open: no device for line #%d.\n", line);

> return -ENODEV;
> + }

--
With Best Regards,
Andy Shevchenko