Re: [PATCH 3/3] net: cdc_ncm: Add ACPI MAC address pass through functionality

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

 



+ if (strstr(dev->udev->product, "D6000")) {
+ sa.sa_family = dev->net->type;
+ if (get_acpi_mac_passthru(sa.sa_data)) {
+ if (!memcmp(dev->net->dev_addr, sa.sa_data,
+     ETH_ALEN)) {
+ if (!cdc_ncm_set_ethernet_address(dev, &sa))

How about use one if-statement instead of these three if-statement?

While using a single compound if statement is possible, my experience is that using multiple if statements will make the code easier to debug and maintain by others who come after me. What is possible to do with code is not necessarily what should be done.




[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