Thread (15 messages) 15 messages, 2 authors, 2015-10-14

Re: [PATCH net-next v5 01/10] qed: Add module with basic common support

flat view

From: Francois Romieu <romieu@fr.zoreil.com>
Date: 2015-10-13 21:55:07

Yuval Mintz [off-list ref] :
[...]
quoted
quoted
+struct qed_simd_fp_handler {
+     void    *token;
+     void    (*func)(void *);
+};
Use union * ?
The token is a cookie to be used by a func, so union isn't appropriate.
Lets' reformulate: replace 'void * token' by 'union foobar *token'.

void * silents compiler. union * doesn't.

[...]
quoted
quoted
+             rc = -ENOMEM;
+             goto ilt_shadow_fail;
+     } else {
+             DP_VERBOSE(p_hwfn, QED_MSG_ILT,
+                        "Allocated 0x%x bytes for ilt shadow\n",
+                        (u32)(size * sizeof(struct qed_dma_mem)));
+     }
The "else" branch after the "goto" isn't idiomatic.
Not that I mind, but is such a prefernce described in any style-guide?
Documentation/CodingStyle gives some hints in its "goto" section but it
doesn't specifically go that far. Is there a reward if I can exhumate
some message on netdev where it would had already been outlined ?

-- 
Ueimor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help