Re: [PATCH 3/5]acpi:glue.c Fix warning: variable 'ret' set but not used

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

 



Justin P. Mattock <justinmattock@xxxxxxxxx> wrote:

> +	if (fn) {
> + 			printk(KERN_WARNING "dev%d: Failed to create
> firmware_node: %d\n", status, fn);
> +	}else if (pn) {
> +			printk(KERN_WARNING "dev%d: Failed to create
> physical_node: %d\n", status, pn);
> + 			return 0;
> +		}

The if-statement should be correctly indented (it's inside another
if-body, so needs to be one more tab over) and there needs to be a space
before the else.

You should probably split your printks up so they don't exceed 80 chars too,
for example:

			printk(KERN_WARNING
			       "dev%d: Failed to create physical_node: %d\n",
			       status, pn);

Also 'status' is probably the wrong thing to print as the number in "dev%d".
If it worked, that should be unconditionally AE_OK, I think.  Can you not use
dev_warn() or similar instead or printk?

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


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux