Re: [PATCH 2/3] NFC: trf7970a: Add ISO/IEC 15693 Support

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

 




Hi Mark,

Just one nitpick here:

> +static int trf7970a_is_iso15693_write_or_lock(u8 cmd)
> +{
> +	int ret;
> +
> +	switch (cmd) {
> +	case ISO15693_CMD_WRITE_SINGLE_BLOCK:
> +	case ISO15693_CMD_LOCK_BLOCK:
> +	case ISO15693_CMD_WRITE_MULTIPLE_BLOCK:
> +	case ISO15693_CMD_WRITE_AFI:
> +	case ISO15693_CMD_LOCK_AFI:
> +	case ISO15693_CMD_WRITE_DSFID:
> +	case ISO15693_CMD_LOCK_DSFID:
> +		ret = 1;
return 1;

and return 0 on the default case.
Simpler code and you don't need the ret variable.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux