From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 4FD201DED74 for ; Wed, 22 Jan 2025 10:32:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737541968; cv=none; b=EET+wFVhdbVcEWqMoRmHtpHdOuwaoLUJOONjB+lAKb6ezGcEsSFakrxNBQ08d9au0W5hW4udJ4elkUZ+eeLRTSOG5xvk743Y4GX+bJ/m2PGayEoFue2lklk8rjfP+5AKRlP2ZYwpObfkFZD5LZnBNFLEsJbg07kIBPshGomqLrU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737541968; c=relaxed/simple; bh=xxdnRxJo9EYSB6NDN79OhYHS4GdenSQMtLSz+tRfN50=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qURrDTuw8ppQ4TUxUQqzQSoWnnIUPC06bAPt5D503+EQTPixmXY8eWDpOb6MtU9AApW3RetqvhbTYyhFDAXZM09Cayp9Hf2hwLjRGcuMd5fS375xSeYWdkf1Kdc178hIqkurQAtFuRws7//J5UdBs6yF+n8EnJeyXGIBvG0Ciuo= 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=T0UaGo4q; arc=none smtp.client-ip=209.85.128.41 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="T0UaGo4q" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4363ae65100so73610165e9.0 for ; Wed, 22 Jan 2025 02:32:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737541964; x=1738146764; 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=sk2qk1CXGKikQHG8pNoA8W9N2pmJaIAGArLyoFJspTk=; b=T0UaGo4qn5TNEocPKH40lWwZLMIWydXRth2/Ch6XEACa/GmUBXJRz9GzdI293E6uLn HiwaYlJXbQ86C5vRIBCslsWNVUCFCQC8n9BOVGQKuPKtu7EPFjfxYXG5nkRJY8mUttQZ RiNfwf+T5niqsiHvNVeg3u686lbcfvzPCCzWz9mjnBjtzp3MogF58xXExpA28Avamv9P g5WBzcTUveWzIe04euq/hZgupP8IgOp+zEZ6QuWf1g8BAAl/eB8XdFgOPl8sMnKlVe9o qAzEYN0C7MnJfskEVMjfrBVqYsg3LhKyUQWfuP+5aNFNTmtIrpmFZAznklCnpnH09XQK 9tJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737541964; x=1738146764; 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=sk2qk1CXGKikQHG8pNoA8W9N2pmJaIAGArLyoFJspTk=; b=mlhukWCG+DqarKZjaKvOw5cwPRo+z4/aB2dnbAQE3Oy4ECG2FsOowE/T3ksBYwCFKX 8nTHeG3Tdija0WCuzwcTwZcxNGQajL6f3KUdHzkeNJKouvfZBcHnKb6r3cit9aMyoJUQ Hjov85Bl1rH9L8B5wG5QHANPyLGi9JzAwDjd0/yehLkFNnJPo4IZbwuSNWVgwzGwdfAj 1HFi9HOsPLZdtDItVlBggAFQnjDvEyfPZcf4ytTXfUFecCTdBFYA0t5ksozC1Y48IrWv rwsMXukfnowNBErVyvpmaIHrKYYQ7Hy/X8PyyqpY7TNK7ieqt/1aokzwWQbbPF+fB7Ui IQDA== X-Forwarded-Encrypted: i=1; AJvYcCXbR4ZVXsSWCYys8yduwN168EVFFC3h/UdUNRJgQtzPDGM+08PO/H5qpXds8NL9Rld5oeBMGbL9NCk+lfg=@vger.kernel.org X-Gm-Message-State: AOJu0YwWhzIaRHJXDm6SSc+ujGSVOCyCvNdEsLNRFOsPB3SqtWD0F1Yc DAdYs/zaUr2HARc2NOaYAWAqTKg05aBjjsBAis7eFtr1tfDZ2JIF X-Gm-Gg: ASbGncvbWqDD1ecieZI3nWgSPmA4JK41h/av6eqwGPMUtXam7C8fqN0Cp+q9BNgP7zs VqALHv4IoAPyKTzuBISmXzBBINhVjAenPnmIIRTc0jMY2ZI3Yo9FZV0WeFJdK7Os2MYRoCzL6Bw 8gZmfTLf32gNwR/nQu8gkhqta6wnu+Mu8e1N7Clyx/A84ZymQ2/blBTgzn08g9GtHmuOiTMKjJa 1C+y75xpX8gf2r6+OzU2cQaHksXSxcGGwQssJtwWQOv6GRip55IElHRCu3to1GAcj8pJoZ6Km1w U2xgfRq/QA== X-Google-Smtp-Source: AGHT+IH3cGesaANWOVg2V250ubV+xkFFVIkxUOQGnCUXei0oYyiXcz68JyvgxGH2R+fi68e/ZNBD/Q== X-Received: by 2002:a05:600c:6c95:b0:438:a1f5:3e41 with SMTP id 5b1f17b1804b1-438a1f53fa6mr156547375e9.12.1737541964260; Wed, 22 Jan 2025 02:32:44 -0800 (PST) Received: from egonzo (82-64-73-52.subs.proxad.net. [82.64.73.52]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438b1cc8151sm17244075e9.1.2025.01.22.02.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2025 02:32:43 -0800 (PST) Date: Wed, 22 Jan 2025 11:32:41 +0100 From: Dave Penkler To: Dan Carpenter 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: References: <20250121203342.20410-1-dpenkler@gmail.com> <6889992d-043d-4af8-869a-84eea9609148@stanley.mountain> 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: <6889992d-043d-4af8-869a-84eea9609148@stanley.mountain> On Wed, Jan 22, 2025 at 10:37:33AM +0300, Dan Carpenter wrote: > 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 > OK I will send a new patch set splitting the patch as you suggested. Thanks, -dave