From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F3F62576F for ; Mon, 18 Mar 2024 08:05:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710749153; cv=none; b=TfYpUpGEh6Th8BYfROYig4kG9bBJ8vpz7FB32OVI1oIeaWTcs+vF/EJpTUw7LHnkuwXTyF/aF2N1yJT6WyQAaSaQbYK26q7Dp6W/9Hd8rYO2GQB+guDgCXY+iS51Mp5e67c1I+DsFYXdi5EjSQbhaRtiC6snSWrDDDRyaIneO+8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710749153; c=relaxed/simple; bh=xi5wwcua6lSYpDyXXRxYzCJScSbcdjnZzat3Av4lAFY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KDGCuXiVh+q8U8ULkvllIBEfUWIUFo3ST211tFoExKxzAjqK4+pALCrRimO6iKoT6nnAb5wPwlh2CxKJgao2G0fwTg1UgJ1tbGcb3rXt9W3bLURg53zNmlEE2y/9shHF4RknUyQAuIWKXdxdLxvBeicHTdvZupc1jcOn4An3V3A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=lcBOLlQs; arc=none smtp.client-ip=209.85.208.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="lcBOLlQs" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-568a53d2ce0so4576923a12.0 for ; Mon, 18 Mar 2024 01:05:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710749150; x=1711353950; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ItwEhW+Elih6WOdZ654FWHRBfnNI2hxeOn7Y1OcJxDk=; b=lcBOLlQsJJHhrlOR8jwNpiV9pjv+mgPTwIkKuLlGvqugNHYh+I2uPNrItMz1CRZyOz xfyIRZM3063F+mh6QHX5uwI93yrkrvEroBqtX/w/zTJrhtFszLcZN48lNLujaLy5+/mi lfxm2z3DxAT0KH0LX3Rlewr6VNWYr5M7nsEV3RapNwJudHX86F5KZ5HUJmlGwAMWtaDD Xx2O8QOuWmIE8IEFWUr+DRWKijuIiFuTNFv+hecLxtQbpe0zwt6vfAEWhQ6ncrGCiPJg cg06XHoQctWVUNKbo8LONaZw2njAIDU6/01J5YjwVxGXjXrXLhQ2AMxKwq9JcX8y++5o 9ihQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710749150; x=1711353950; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ItwEhW+Elih6WOdZ654FWHRBfnNI2hxeOn7Y1OcJxDk=; b=KUBf+ULBngEqtd1CuRcjWYWjC1W4jrlhNFvyB6qmXVjj9Xr9gHQv7qNJPa/5xLp6Bv m8+HPgvKQ4GAcc6WwaNHiaecfJlgDzE4IJo4ipk+QIu7iGjLdEH0P+V1heqwVT3BrD6h ltBKX9cDB2+fxihZC98vyZZ0QT1K9+24+G+RtU+e+hJd9DoWRU62XgYCMNjR7/NDi9xA APlECF2L13v0V1al+LPPyQ7oMc9b1tQsr9/+PVaX06JuR3D7SMSiyNdORqdxik5U82mU 7JX5BFMgq2TrDO2ntYmraQoYuIvbnM5/hGGo2dFgXxItorSD3BnznXX+XKLHRO9bdRzf gHyg== X-Forwarded-Encrypted: i=1; AJvYcCUo6f7W4GlNAz+0RkXRT8svyxOMYTfYAotOorNMZf3CVRa+5/K8uvwbW5Znzv7cw6PotpSc7FQxU4O2/uX19aV++ZLOTpNT X-Gm-Message-State: AOJu0YzGrfOyPpAW7UPdQubpiAkypW7tSUZS9mYBiIRUAjFCUBTObpsX r+JVxvoUNDeSG8XV8WP0p8+xZaLtTnUC2a0O2iffltDH+P7dHngv9jmznV7Hyx4= X-Google-Smtp-Source: AGHT+IHKtcrmJOgM+mlLfZ7Vs05DyRjA6NQDYRTKLkIuZFdj2gc0SGhwQECvBIW2kaQ3t2ReK5LFKw== X-Received: by 2002:a17:906:5fd5:b0:a44:e371:a31b with SMTP id k21-20020a1709065fd500b00a44e371a31bmr6557533ejv.10.1710749149848; Mon, 18 Mar 2024 01:05:49 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id ht17-20020a170907609100b00a461b1e814asm4517581ejc.130.2024.03.18.01.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 01:05:49 -0700 (PDT) Date: Mon, 18 Mar 2024 11:05:45 +0300 From: Dan Carpenter To: Ratheesh Kannoth Cc: Christophe JAILLET , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16 Message-ID: <148f58b6-fe56-4fd2-b430-d6aa40037bb5@moroto.mountain> References: <20240318032133.GA1312783@maili.marvell.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240318032133.GA1312783@maili.marvell.com> On Mon, Mar 18, 2024 at 08:51:33AM +0530, Ratheesh Kannoth wrote: > On 2024-03-16 at 15:46:10, Christophe JAILLET (christophe.jaillet@wanadoo.fr) wrote: > > UTILITY_NAME_LENGTH is 16. So better use the former when defining the > > 'utility_name' array. This makes the intent clearer when it is used around > > line 260. > > > > Signed-off-by: Christophe JAILLET > > --- > > net/caif/cfctrl.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c > > index 8480684f2762..b6d9462f92b9 100644 > > --- a/net/caif/cfctrl.c > > +++ b/net/caif/cfctrl.c > > @@ -206,7 +206,7 @@ int cfctrl_linkup_request(struct cflayer *layer, > > u8 tmp8; > > struct cfctrl_request_info *req; > > int ret; > > - char utility_name[16]; > > + char utility_name[UTILITY_NAME_LENGTH]; > Reverse xmas tree. > It's always hard to know what to do when the original code isn't in the correct format. Someone sent a patch last week which fixed a bug and partially converted a declaration block into reverse Christmas tree... regards, dan carpenter