From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939964AbdAFK4u (ORCPT ); Fri, 6 Jan 2017 05:56:50 -0500 Received: from mail.skyhub.de ([78.46.96.112]:56240 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752989AbdAFK4o (ORCPT ); Fri, 6 Jan 2017 05:56:44 -0500 Date: Fri, 6 Jan 2017 11:56:11 +0100 From: Borislav Petkov To: Junichi Nomura Cc: Andy Shevchenko , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" Subject: Re: [PATCH] x86/microcode/intel: Fix allocation size of struct ucode_patch Message-ID: <20170106105610.tr7xv6x5fj2uuqgc@pd.tnic> References: <7a730dc9-ac17-35c4-fe76-dfc94e5ecd95@ce.jp.nec.com> <06089643-a36b-93b2-1d26-0336c4d0583c@ce.jp.nec.com> <20170106000237.5dybkvr35sbba2yx@pd.tnic> <8d24ed6b-9c81-74e3-848d-47ff72b752b4@ce.jp.nec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8d24ed6b-9c81-74e3-848d-47ff72b752b4@ce.jp.nec.com> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 06, 2017 at 12:14:13AM +0000, Junichi Nomura wrote: > Personally I have same opinion as yours. :) > > But according to Documentation/process/coding-style.rst, it seems > "sizeof(*p)" is preferred style and the reason there makes some > sense. > > Quote from coding-style.rst: > > The preferred form for passing a size of a struct is the following: > > > > p = kmalloc(sizeof(*p), ...); > > > > The alternative form where struct name is spelled out hurts readability and ^^^^^^^^^^^^^^^^^^^^^ Yeah, right. Change is from 2005 (af4e5a218e18a). Pekka didn't know better then. :-P -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.