Re: emxx_udc device tree bindings

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

 



I don't know about device tree...

There a bunch of easy aesthetic things one could do.

1) Get rid of forward declarations. (I haven't looked if this is easy).
2) Remove underscore prefixes from names.
3) Fix the comments.  (Delete most of them).
4) pr_info("=== %s()\n", __func__);  <-- delete useles prints
5) Clean up the strange white space.
6) Also it's a bad idea to try to align declarations inside a .c file.
   That's fine for struct declarations in a .h file but in a .c file we
   mess with stuff too much.  You need to change all the declarations to
   make them line up but it's not really related to the patch so you're
   not allowed to change them.  Catch-22.

   In other words change:
-	int             result = -EINVAL;
+	int result = -EINVAL;
7) Remove pointless NULL checks:

	ep = container_of(_ep, struct nbu2ss_ep, ep);
	if (!ep) {

We already know the _ep is non-NULL so that means container_of() can't
be NULL.

regards,
dan carpenter



[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