From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751166AbdAQTDR (ORCPT ); Tue, 17 Jan 2017 14:03:17 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:46142 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751127AbdAQTDQ (ORCPT ); Tue, 17 Jan 2017 14:03:16 -0500 Date: Tue, 17 Jan 2017 20:02:59 +0100 (CET) From: Thomas Gleixner To: Borislav Petkov cc: X86 ML , LKML Subject: Re: [PATCH 03/13] x86/microcode/AMD: Clean up find_equiv_id() In-Reply-To: <20170117184927.fecw3m6cm6rb3p3j@pd.tnic> Message-ID: References: <20170117173734.14251-1-bp@alien8.de> <20170117173734.14251-4-bp@alien8.de> <20170117184927.fecw3m6cm6rb3p3j@pd.tnic> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Jan 2017, Borislav Petkov wrote: > + for (; equiv_table && equiv_table->installed_cpu; equiv_table++) > + if (sig == equiv_table->installed_cpu) > + return equiv_table->equiv_cpu; This would be perfect if you just kept the braces around the for loop. for (; cond; incr) do_something(); parses perfectly fine as it matches the expectation of a single line statement following the for(). for (; cond; incr) if (othercond) do_something(); not so much because we expect a single line statement due to the lack of a opening brace after the for() for (; cond; incr) { if (othercond) do_something(); } That's how it parses best. The opening brace after the for() tells us: here comes a multiline statement. And the inner if (othercond) w/o the opening brace tells: here comes a single line statement. Reading code/patches very much depends on patterns and structuring. If they are consistent the reading flow is undisturbed. Thanks, tglx