From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 29587424C3; Tue, 11 Jun 2024 17:10:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEEFE40A67; Tue, 11 Jun 2024 17:10:42 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2067.outbound.protection.outlook.com [40.107.95.67]) by mails.dpdk.org (Postfix) with ESMTP id 650C14021F for ; Tue, 11 Jun 2024 17:10:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RaVdy/4dMxm0j5YEf2IfBuDZrdinBRt821wAgqCXVgaj5fyVYLhX8laRPMHrP2l3btTwsmkQQ5AMORkeHfQDIZ5H+UD8XRbKmDlXM8C8t9836bMm2FeZ7cH6RpIAjTWzP8I2YGZ27yeqBgT8Ob+Z2pzs55buifl/I9f6/Ikd6xmSTipmJ5zKVgoF59zp+Qg97G1hC+tqkZwYKoxHQRQXRE3biB2Uj3q4qMb5IJnfmnYNWKqnlMgWdHPmki3pJmg+iNd90R8PJQOsQcH2yMa+OG5xKqkyonVhhXy+x1viy9eajq26DKGTiXLE+3FO4zxD2JG4rQw33x8SSkx0g9YNLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JDhoCf6P1sFpth8+BfhJ8WzlGRD86A2Inw1B2Ss/cpw=; b=H6PGOrz28hOL1we4+e9ZZTBohwhhkfyCMXOjDPOfZiAb410IlLrGPlNM5sZ7OERbPggOweifCb+dJ03yKicmTq1Iavt2X3pJEJJPAw0CaMQEjz8xbRlK9zFxWVk8ruOcSJj6NZwp3QybMUdKZ6fZpbCvL2zabrOQUZr1u0njARDFzELiKgLClp+y/CxY/4a9qFlpY73OEDbyfaI0+8r4jtwJ2dyn1RISxeM97y5I9bQCVVg00+EKrB45UBSWu4AUPouAGQ6drZIs7FFiDdjCMlunmc3o8IktNzk99m4GzFs3O+Wix3O9HAatCt6yee+mKLnyUTqtYUDGjvjr8/LWAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JDhoCf6P1sFpth8+BfhJ8WzlGRD86A2Inw1B2Ss/cpw=; b=uT+X682GGtEcLuhtSux/piO06a8hjcp8s+VspNKQ/w/WNQfwljkAQzQ8SunY5WyHVxxy5UTma4eJDZWuWT+3ry/EHKvP9KcNscfORsVwXs3841tWKpwb/LjlJhj6RUVImAcxBcmoley3yCean7ugYPurXsxH0jWDJOVYHV2w8zA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by CH3PR12MB8308.namprd12.prod.outlook.com (2603:10b6:610:131::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 15:10:37 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::ebfb:2f9f:f9ca:82cd]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::ebfb:2f9f:f9ca:82cd%4]) with mapi id 15.20.7633.036; Tue, 11 Jun 2024 15:10:37 +0000 Message-ID: <190c4772-9ee5-466a-adc1-a0c4f5bb75f8@amd.com> Date: Tue, 11 Jun 2024 16:10:33 +0100 User-Agent: Mozilla Thunderbird Subject: Re: Coding Style for local variables To: =?UTF-8?Q?Morten_Br=C3=B8rup?= , dev@dpdk.org References: <98CBD80474FA8B44BF855DF32C47DC35E9F512@smartserver.smartshare.dk> Content-Language: en-US From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJkdyEEBQkE3meNAAoJEFRTPtCK Km/6UdcP/0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xKuyO 8Zk= In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F512@smartserver.smartshare.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P265CA0184.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a::28) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH3PR12MB8308:EE_ X-MS-Office365-Filtering-Correlation-Id: a7c68555-97fe-420c-babf-08dc8a28a5f3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230032|376006|366008|1800799016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?N0ZVWnY3TXRYVS91dFk0RW1ESi9FZ2Z0c0JnQ1A0b3o1ckN5T1oyZUduMk1O?= =?utf-8?B?aDBVcEFwNWV1Z0txNm5nSzB5MWxOb2NDc0pTUy9qOEx0V2pmSVFUQ1Z2K3Np?= =?utf-8?B?K0hRb09CN1hhNmpvaTRYQTdCZGJKR1VaU0oybklIMjMrdldQeGMxOVBORk5Z?= =?utf-8?B?MFBYcjA3MmhscUZMSWFkSEpFcjc4Z20reWlBY1RVOUVlYlJUMEhKKzB1eGE5?= =?utf-8?B?bHZMNFBlWVZnUnVGREFWTUk2eDdMamsvSTBwWEZwWHpVZDJSNFI3L2dKckRt?= =?utf-8?B?MmdOeUV2cjJVUkN4Ri9IUUZYOW9mZzM4YkVmV1JmRnI5cittV243YzBUWWl2?= =?utf-8?B?RHN0OHpocWxxMlRKK1hGcUF3V2xRWkNrblZIVGIwR3o5YkptNzNDS1RObHlp?= =?utf-8?B?dHZ0OGJpbGxqQVlXZEVpKzdLVFNuY2czbjVyQXhJd2U5VnA1ZGp0bkVmNElO?= =?utf-8?B?ZFYyenlSVUdiZFR5RWRvNU5BTWRTVFJHTUVST3p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T2QrMGovTnhnd25QWS85NnY5Uk91NmRjWWhX?= =?utf-8?B?OVhsQitsYjdRNzZVemYyUzhJMEw3WVVTYTljcVlRbnRRMUR2eUtGc05FeDBs?= =?utf-8?B?cWNjZTlmNktyRm9STHZ1YVczZ2JUMTRFd3J2WVRuUWtHTVFxM2dnYkV4Z21I?= =?utf-8?B?RjE3WCt4a3pVRSs4TmpkTWR6RzJFSVJGTUtFdlNaTTZ3eE1DRkUraG9BMlZ5?= =?utf-8?B?blpjeEJnMm45ODEwcC95WkdYa3JQTEdmQi9CTWdWQzJjclpSOVc3Q29ub1hq?= =?utf-8?B?V2xEQ0JXcTBRZlplV1RBYWhFYVlhNEVqcE85cjhGZGdQeGhNTHlrZXEwNGc3?= =?utf-8?Q?AHf1qK09f86nhwcD6Hlqp/wGjSF+2bcIVt6fVrS?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230032)(376006)(366008)(1800799016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RHVucmZaN2RTYmh4S2lqazFhMVJHcThJbXI4bytNenk3TmJYeUtWbWZPTVl3?= =?utf-8?B?c1NqZUZSNnhGbm0rcytxRVNLVndPR3lrdlk4VVowb1RMeWVXMzEzKzVONlJh?= =?utf-8?B?U2RCNnZUZ0Y4RzFvTWQ3TTU0alU2aXJ4Rk9VVmZyQURMcHkvODFnenpJZEpI?= =?utf-8?B?ZFRIRVRVWGdvOXZzM3pIVUROb0hxSHZMT0tES3dkbjFBakVUSTZBV0Y4Ty9z?= =?utf-8?B?NllFTnV1U2NOSmFsUzRnQnVWT2tBT04yMXQ1cThjVjhmS0ZHOFhQYXJKQ1h1?= =?utf-8?B?R2xxSWhiVmN4SU5lWmtYeDRBS3FTYlNXTU1W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F1cVJdhHkTAV7+Qw?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7c68555-97fe-420c-babf-08dc8a28a5f3 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 15:10:36.9099 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UwJVSBR/utIzTc9WgRdfEGiJ4hW1wk+OTocQMRVEfIv/ryVFxN/1p0doJiewQEKD X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8308 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 6/10/2024 4:10 PM, Morten Brørup wrote: > The coding style guide says: > > "Variables should be declared at the start of a block of code rather than in the middle. The exception to this is when the variable is const in which case the declaration must be at the point of first use/assignment. Declaring variable inside a for loop is OK." > > Since DPDK switched to C11, variables can be declared where they are used, which reduces the risk of using effectively uninitialized variables. "Effectively uninitialized" means initialized to 0 or NULL where declared, to silence any compiler warnings about the use of uninitialized variables. > > Can we please agree to remove the recommendation/requirement to declare variables at the start of a block of code? > My concern is it may break the consistency in the code. If there is an existing function that defines N variables at the beginning of the function, new feature defines a new variable close the the feature block, this inconsistency bothers me more than all variables being defined at top. Variables being defined on top only bothers me when function is too big and I can't see the variable declaration at the same time while I am reading the code. If functions is small enough to fit ~50% of my screen, locations doesn't really matter, I can still observe (effectively) uninitialized variables etc... Instead of trying to optimize big functions, I am for doing other way around to encourage smaller functions. (Indeed I prefer 80 column limit with 8 space indentation for exact same reason, this *artificial* limit only allows some number of indentation and at some point forces developer to extract some part of code as new a function.)