From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 9C99333B949 for ; Fri, 29 May 2026 10:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780051157; cv=none; b=OAaG+PyaWItpt3ujs01n2L4kWDLjldRR09jukl+A3efHVX52KUPYnumJdIEJj3ibTppSvoXMcSvbZ+QYCl76/VmrScu/xaXnoRSDXYJE9CiUxOdnCxwBut4FWEEImhnVLtYTLXP5qNmMTpfSGmadMupOU2C2GJgXzGHMPKaK2Pc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780051157; c=relaxed/simple; bh=rvgiEl9LQVqE5UrFPQ7CggVAH3MVjiWMkIFeKt9hmBg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O4b1zduRVwxKyBdQSJrQCo+F3jpoGwqmcEkF0E3rMu2+QJnRe2IGbMG4BRetWn3grjhgz4h7qT4x2I2pr1caNx+0Sch5XkCTq8Ow8vlgwnfAtGdLSzPD4otSJnkIzOEd09vUOA40UFwlrzByYcEO3C3etbLQZX57e4ixn/Eqj5E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aAlo1sKJ; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aAlo1sKJ" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-45eeba68948so1091678f8f.1 for ; Fri, 29 May 2026 03:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780051155; x=1780655955; 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=JRYr8moLEmjRWHLilv4FqgfxJEhbzr36lw1lU/Q2qfI=; b=aAlo1sKJAp4azpfhlBPGmtV76ANBzB2tw3V4GlHMCS+W4pvFgL9RjfVjMjg1dLdGP0 BQxibvfmpe8/01d+Z3+PKaTkfCpU6H4tI8jqfLvmBtNu/ASIfKRV9V6FR8Avj5lVBVq8 1D8dlnWbWf1nXC5VQ0AXhssh2dULN17PLS/siBQOW2RMJ++md5OMY7fLrn6X1Sbt7eIV 900/05ApbffNjHc1fEYv1/6xTeXjzwELuchA9QHI/GMmNRiY1WMYGAxRXFTArJOQ9ums 6P11807AQq9pNt6PtrEpTGVLrzzuGStu02FGT6QHQe5ixbacm+zXdrxIbfsuI4nxpxTV saWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780051155; x=1780655955; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JRYr8moLEmjRWHLilv4FqgfxJEhbzr36lw1lU/Q2qfI=; b=Q7ecQBtX5Z15Wq2G2MDHgE6Z0pmidVMNG/LKBnY325zagpHVT2UPjXw3rCAznh2Kcn s9K9KOoT952aWs2Iiz+LXWDkeI2RnCHNTZFCOo1g7CwiPYbd9D8wZqS2dd07vdQl+SHr 9PIOD/1TDtY7kiGUzP5kJwebLxMW4D+B5gdEd4F9GNVKu9feNqf0mp5Tt1hcNolHr6jc xkjJ6k400typKCx55zBz+ezYdHIA/KTG3EplaFwMZxTxgyHJ60wbycJe/Plfyedr0pSt 69LL37hq00EMrQ1tADptDJ5CbFiUt6//b4rCWx6Bu2TjjdCB7ArkfGLSwdZi1doOqGht /2Wg== X-Forwarded-Encrypted: i=1; AFNElJ9/yE02FR0kfgV6mhhdKvMaQUiaadnweu7Jpg+GDJaU5gSPhvedBz4SWYPyj8wZwiWJFe93Ir8jy49u/XM=@vger.kernel.org X-Gm-Message-State: AOJu0YwJd8k440enXiXONkkCRzqq3HQPkyZf7LUFJCKDjmuYQkW2GAFM /5uhFNR3CU8gv4rts+qDL0Huv4Hq1UPceGAt40wGFicYBKx7F6ZRhjFH X-Gm-Gg: Acq92OG2RNrrjI+YH/gFEhQKRV+7CbZ6571wA/mT/TpCdsXu2WiZKNgBRJC2QCzpSwV 3csKffzZMMNGYo/T8NzVUt0FEVC1Lq8A/KFZytE7SuFyr12Cuwl8ow453K/S55yXKWyKfzUEPU7 1OoNwMmxy+c1LSfErW31s/hVb6wv31trk+d41AG1V84lVnMJiTwv6xai6p+3KG/RCdvN5py1sIl Vdcqva8obvdsU8GjM+CpydkHSSoxteYC66AmiBgBT5oad02XVOTSWtHFDcIbFBOw3n4hd59J8N0 Dq1qd0KEJ8wuOH24oaZdPQ5VMStpbC6ijVDX87tmAs4Wm6pzNF+vr0UlNkm43VrVU5rOY/Jusry vJyDlMMGFHvYsDk0a9L5u988DIREnn95qTSmBMpXaSwzOquULZ6UsehZx8o/AXIrszbdcMrJass 9KT5OQbzU0nheB94tw1JWJsTgdotJ71aGxszP5NF+wZm8A X-Received: by 2002:a05:6000:4697:b0:45e:b215:12e9 with SMTP id ffacd0b85a97d-45ef140238emr2957539f8f.6.1780051154817; Fri, 29 May 2026 03:39:14 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef357635fsm2492792f8f.33.2026.05.29.03.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:39:14 -0700 (PDT) Date: Fri, 29 May 2026 13:39:11 +0300 From: Dan Carpenter To: Onish Sharma Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com, gregkh@linuxfoundation.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: sm750fb: remove unused variable Message-ID: References: <20260529101242.10189-1-neharora23587@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20260529101242.10189-1-neharora23587@gmail.com> On Fri, May 29, 2026 at 03:42:42PM +0530, Onish Sharma wrote: > Remove the set_all_eng_off flag and its associated cleanup logic. > The variable is redundant as the hardware should be initialized to a > known state regardless of prior usage. > > Suggested-by: Dan Carpenter > Signed-off-by: Onish Sharma > --- Sorry, miscommunication. This breaks the driver. This is also a bit more involved than I thought... There are two structs: struct init_status { ushort power_mode; /* below three clocks are in unit of MHZ*/ ushort chip_clk; ushort mem_clk; ushort master_clk; ushort setAllEngOff; ushort reset_memory; }; And struct initchip_param. The initchip_param is exactly the same but with all the struct members renamed and comments added. They have to match because we cast back and forth. Why do we have two different struct that have to be the same? You might think it is for API, but as near as I can see that is not the case. Maybe it was at some point? We should get rid of one struct. Which everyone is API is the one we should keep. If neither is API then get rid of init_status and keep initchip_param. After that we can talk about getting rid of setAllEngOff/set_all_eng_off. regards, dan carpenter