From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 22509154420 for ; Wed, 22 Jan 2025 07:37:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737531461; cv=none; b=VGXJtxoTNeERuN3yK8AQcgKpLXqQdgJ5GKJrQyZuDzyK+MERRNM0JqMS+pBVtCr9gmpi9hvC560/e4wiK4qQK7l3XWpI9uLUmNNWoPYt5+VgaK98IpKsPeTJPK3JyHLRLQLtDi180IjP1tvkUCm+NY7Dbpzv7eenWyRBT6+pIew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737531461; c=relaxed/simple; bh=VWwydFgNvCWiELV0oJ4KItE6mZdWyU3N0xVYBWx7mo0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gwhcLO4Rk2hvmdEwZd3GcN5dJAk/mQ1SoxJSJUmy/npDTGwhF+5A2D5nCK2iBIQLC2D/HXQ7DrCQtq+TaVIqvp/9TzpCbM9loD+4ZtjeSegBag2t4jPQLXO+jfx15opXXaVtgQfRlFfFKhgUtlnMJwdwh0DeE85Z6VmrooIDtL8= 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=krdg2CU4; arc=none smtp.client-ip=209.85.221.54 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="krdg2CU4" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3862d6d5765so3728977f8f.3 for ; Tue, 21 Jan 2025 23:37:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737531457; x=1738136257; 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=dNXAv1sOgHnAoK/xiQRFluG+pZsyfhRNgiqEuvcBE48=; b=krdg2CU46KYjqez/EZvKUW8mvazVDX2RcVXlwiZEgKkIOxfMIlDfU8wpkM/hJJJseo xasGh/DKde4/BdiYWx5stWraWl6RX/BpYBGPLIbXTZgTA/eQVOgKaIEpqJm8UxrzGgai JmiGX1L+/V0UUClgRkjPR/8HiKWILI4+G1mzM9tqlcyFy8cCOWZLuyqOJMTtaX3W8TS4 HEFiRdFxFP7WtODvGull5UqOZnqu4nlZ1+ufZzNJOY+XjjVjWf/+hca6VeSGOxTEGJl3 AuX6m+9jwFp6ZW827/crX33/zzdiRYBNYtmDliEwEe7J7lCu1dpk7Ks38+WktGzPe94W Vv3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737531457; x=1738136257; 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=dNXAv1sOgHnAoK/xiQRFluG+pZsyfhRNgiqEuvcBE48=; b=Egw6wK9lkqjW2zNe6NvcU0ShJSKQx8qdnrAHHQRmhicWu2OjMB4WnAffOHTUWuCER/ VBqjC2k5J5GK6VcG6tc7aHH4zyS0LQKOc7OQMuzAdxM1obx669l5gMo118iI7a8i4yIo z+Q08woXBfdQVi7beEK+3VRW0q0u2Qpm/57A1qYg/G3YNXovkW8VSJHRykH99fmirM4q XJ/JUMq2IS9dFfqO8cnMT9dtuSm11Oe7eF9UXb6C7rNkkb2+xrUKR44fu3OWXJSikffR YnbAAcxwt+z+hJYjS0I1vR6JdzWK75P9Ri4lvIIZ37gXwGRBxK64r/KynlN8yrQnOUxd pg3g== X-Forwarded-Encrypted: i=1; AJvYcCUs77TStQ4prymeWD8zrVrJIE2dG1bDpYTmG2j0qJrf/A2p36jpr9/88KXf2hj2O45SRzeffZbgBzMr3s0=@vger.kernel.org X-Gm-Message-State: AOJu0Yz8+rAkVBOIAdUXjXp6UisKyxkKzzTRQRkcb0YNLcHoDmXja2JW D9kUfih44goMNi4mejAssd+K7S6P++qrsNpA7fQKtdYwEBAIXnzpgrmxs7AvBgRX9mSC5dzxqGe B X-Gm-Gg: ASbGnctrvApn+/6ULWO1UlbegEnIS/oH0K8/Xygz0YNL3ZInimLT1T8vzf1JCexe9Vz zHrpTELlB0jeZWGR7YvPrPWVUzRJVkpxTZqmmrmgIqDzKhqOj99jLzRpuKy3ASKJMN+yVMvuudQ lI1djdYJ//4K+6fEudiRoA+sXFQBIT+/KZ8afYS8drM6J2H6CvV+jw7p9da1WZp0JduwfQq84BC //hi1zIrFS2unc0ZjmQnjMv1CZzhj1PpEKgvfL0Q2yWXFbBis2jQHwhfPEzwVXEzsiCnKE7mrM= X-Google-Smtp-Source: AGHT+IGTbLbW27zAi4Tv8DUMU6utxaKB8tEU7e1Ul0eZCzKJckoztM2eXFLMWROGgI4cBrdHOxHiug== X-Received: by 2002:a5d:64c2:0:b0:38b:da6a:8a02 with SMTP id ffacd0b85a97d-38bf59effcdmr17934215f8f.47.1737531457257; Tue, 21 Jan 2025 23:37:37 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf3221b65sm15800453f8f.33.2025.01.21.23.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2025 23:37:36 -0800 (PST) Date: Wed, 22 Jan 2025 10:37:33 +0300 From: Dan Carpenter To: Dave Penkler Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: gpib: Make static and reduce forward declarations Message-ID: <6889992d-043d-4af8-869a-84eea9609148@stanley.mountain> References: <20250121203342.20410-1-dpenkler@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: <20250121203342.20410-1-dpenkler@gmail.com> On Tue, Jan 21, 2025 at 09:33:42PM +0100, Dave Penkler wrote: > Declaring the entry points as static caused a warning that the > serial_poll_status function of the agilent_82350b driver was > unused. > > Add the entry point to the corresponding interface structure > initializations where it was missing. ... > @@ -842,6 +824,7 @@ static gpib_interface_t agilent_82350b_unaccel_interface = { > .primary_address = agilent_82350b_primary_address, > .secondary_address = agilent_82350b_secondary_address, > .serial_poll_response = agilent_82350b_serial_poll_response, > + .serial_poll_status = agilent_82350b_serial_poll_status, > .t1_delay = agilent_82350b_t1_delay, > .return_to_local = agilent_82350b_return_to_local, > }; > @@ -869,12 +852,12 @@ static gpib_interface_t agilent_82350b_interface = { > .primary_address = agilent_82350b_primary_address, > .secondary_address = agilent_82350b_secondary_address, > .serial_poll_response = agilent_82350b_serial_poll_response, > + .serial_poll_status = agilent_82350b_serial_poll_status, > .t1_delay = agilent_82350b_t1_delay, > .return_to_local = agilent_82350b_return_to_local, > }; So what happened is that Sparse was complaining and you were cleaning up the code and you discovered this bug. Fine. But bug fixes need to be in their own commit, not hidden inside a giant cleanup patch. They need to have a commit message. Quite often it sucks to discover a bug like this because the bugs have to be fixed first before the cleanup. We're a bit less strict on this in staging because realistically there are lots of bugs and lots of cleanups and they're going to get mixed together. But other subsystems maintain a fixes branch and a new development branch and so bug fixes have to apply cleanly to the fixes branch. So in that case you would need to save the diff of the cleanup. Go back to the start. Write the fix. Apply the cleanup diff on the top. Deal with any failed chunks. What a headache! I get that. And you're from a gmail.com address so I don't even know if you're getting paid to deal with this crap... Quite often it sucks but in this case, it's really easy. Use `git citool`, highlight the bugfix lines, right click, add to commit write a commit message and done. Make sure it still builds as a stand alone patch, though. Quite often when I try to highlight and click on all the lines in a bugfix, I accidentally leave out essential pieces. regards, dan carpenter