RE: [PATCH v6] ACPI / serial: Add peripheral PnP IDs enumeration support

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

 



Hi, Greg

I think I may misunderstand what you mean here, let me confirm again.
Sorry for doing this.

> > > +#ifdef CONFIG_ACPI_UART
> > > +int acpi_uart_get_peripheral_type(struct device *dev,
> > > +	char *buf, size_t size);
> > > +#else
> > > +static inline int acpi_uart_get_peripheral_type(struct device *dev,
> > > +	char *buf, size_t size)
> > > +{
> > > +	return -ENODEV;
> > > +}
> > > +#endif

> > I see you never tested this code without the configuration option enabled :(

I was thinking you were talking about test plans.
Since I didn't see any issues here and I just didn't want to argue on this topic and replied in this way. :-)
The only user - uart_get_attr_peripheral_type with "int" return value check can ensure no issues here.
> > > +static ssize_t uart_get_attr_peripheral_type(struct device *dev,
> > > +		struct device_attribute *attr, char *buf) {
> > > +	int len;
> > > +
> > > +	len = acpi_uart_get_peripheral_type(dev, buf, 1024);
> > > +	if (len > 0) {
> > > +		buf[len++] = '\n';
> > > +		return len;
> > > +	}
> > > +	return snprintf(buf, PAGE_SIZE, "uart\n");

Now I realize that you might be talking about the "-NODEV" return value is not a good choice, "0" or something else is better.
Shall I return 0 here?

Thanks and best regards
-Lv

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux