Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965808AbcJFJ3Z (ORCPT ); Thu, 6 Oct 2016 05:29:25 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:36676 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964918AbcJFJ3W (ORCPT ); Thu, 6 Oct 2016 05:29:22 -0400 MIME-Version: 1.0 In-Reply-To: <9831fce9-d689-89e4-dec8-50cadcd13fdd@users.sourceforge.net> References: <566ABCD9.1060404@users.sourceforge.net> <786843ef-4b6f-eb04-7326-2f6f5b408826@users.sourceforge.net> <9831fce9-d689-89e4-dec8-50cadcd13fdd@users.sourceforge.net> From: Richard Weinberger Date: Thu, 6 Oct 2016 11:29:20 +0200 Message-ID: Subject: Re: [PATCH 24/54] md/raid1: Improve another size determination in setup_conf() To: SF Markus Elfring Cc: "linux-raid@vger.kernel.org" , Christoph Hellwig , Guoqing Jiang , Jens Axboe , Mike Christie , Neil Brown , Shaohua Li , Tomasz Majchrzak , LKML , "kernel-janitors@vger.kernel.org" , Julia Lawall Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 608 Lines: 17 On Thu, Oct 6, 2016 at 11:22 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 4 Oct 2016 21:46:18 +0200 > > Replace the specification of a data structure by a pointer dereference > as the parameter for the operator "sizeof" to make the corresponding size > determination a bit safer. Isn't this pure matter of taste? Some developers prefer sizeof(*ptr) because it is easier to type, other developers prefer sizeof(struct foo) because you can determine the type at first sight and makes review more easy. -- Thanks, //richard