From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758034AbbICTsU (ORCPT ); Thu, 3 Sep 2015 15:48:20 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:33713 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751445AbbICTsQ (ORCPT ); Thu, 3 Sep 2015 15:48:16 -0400 MIME-Version: 1.0 In-Reply-To: References: <20150902.223522.1792493140210966693.davem@davemloft.net> <20150903.104032.767889134756094076.davem@davemloft.net> <1441305296.9666.14.camel@perches.com> Date: Thu, 3 Sep 2015 12:48:15 -0700 X-Google-Sender-Auth: 13Dab94vGrmibhKQKKcmpwIQM-E Message-ID: Subject: Re: [GIT] Networking From: Linus Torvalds To: Julia Lawall Cc: Joe Perches , David Miller , Lorenzo Bianconi , Johannes Berg , Andrew Morton , Network Development , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 3, 2015 at 12:32 PM, Julia Lawall wrote: > > I find 518 occurrences of a function parameter declaration that contains > an explicit size. But only the sizeof(mcs_mask) where there is a sizeof > on such a parameter. I also checked for ARRAY_SIZE on such parameters, > and didn't find any occurrences of that either. Are there any cases of multi-dimensional arrays? Because those actually have semantic meaning outside of sizeof(), just in things like adding offsets. Eg something like int fn(int a[][10]) ends up being equivalent to something like int fn(int (*a)[10]) and "a+1" is actually 40 bytes ahead of "a", so it does *not* act like an "int *". (And I might have screwed that up mightily - C multidimensional arrays and the conversions to pointers are really easy to get confused about. Which is why I hope we don't have them) Linus