From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerlando Falauto Date: Mon, 12 Dec 2011 14:52:41 +0100 Subject: [U-Boot] [PATCH v2 2/3] env: check and apply changes on delete/destroy In-Reply-To: <20111212130810.02D0D183AA36@gemini.denx.de> References: <1321634955-5561-1-git-send-email-gerlando.falauto@keymile.com><1323264605-13541-3-git-send-email-gerlando.falauto@keymile.com> <4EE5CA4A.8050601@keymile.com> <20111212130810.02D0D183AA36@gemini.denx.de> Message-ID: <4EE60729.4020401@keymile.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12/12/2011 02:08 PM, Wolfgang Denk wrote: > Dear Gerlando Falauto, > > In message<4EE5CA4A.8050601@keymile.com> you wrote: >> >>> You could just use 'apply_cb apply' for that param I think. >> >> Absolutely. I introduced the typedef at a later stage and forgot to >> update it there too. Good catch, thanks! > > Run checkpatch, and mind the CodingStyle section about typedefs! I did run checkpatch, it didn't say a word about this. What is your recommendation about typedef'ining a function pointer? I immediately suspected that using a callback function might sound like heresy, so if you have any better suggestion please put it forward before I rework this changeset for the fifth time... please. I just think having the whole, expanded signature as the type for a function-pointer parameter or local variable would just make things too long and redundant. Just off the top of my head: perhaps a struct with a single function pointer element might look better than a typedef? Thanks, Gerlando Falauto