From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (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 626CB482EF for ; Sun, 5 Jan 2025 02:52:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736045536; cv=none; b=KCblAtLEdFLCbp16P1atNFiGXxO6kZ4kUmwi+jSUNXfELuDtOA6jl9YI5jGMFWEGPCayaskvqnLjbk24vChrhWgxg5WlZtpu6s5bNeBe4WGJmRxes6IC8iJDbDFwNY8/EcHqDif9+eiDl10IzsvMx6aEjzNTPW6UEO5Bh881x5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736045536; c=relaxed/simple; bh=Ed/ZqvZRaVGHS9E8QAIyTsjOhw61iQHgVTsB3gr5hH0=; h=Date:Message-ID:MIME-Version:Content-Type:From:To:Cc:Subject: References:In-Reply-To; b=cvgK3kVsRybw+ae4AZ9kxA5eDRi1kXDpmkIUpH3PNuEinVAxwnwNbrm5RYkIbTYnoH20K/Oj1B1+tqw3S2Nn4lrr5WwiD2Nh4iop7sPwA0qJT6HI29MTPlEcouf8B6hzW0drzkk08y0ZeOinVa6dF6Ufata7ks7qGxQW8Uv/gCw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=HddofRKK; arc=none smtp.client-ip=209.85.219.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="HddofRKK" Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-6ddcff5a823so9503226d6.0 for ; Sat, 04 Jan 2025 18:52:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1736045533; x=1736650333; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :mime-version:message-id:date:from:to:cc:subject:date:message-id :reply-to; bh=TYn3W1dDrfsPK7DEpP2DitIJR/82bjH5cihKblylHmE=; b=HddofRKKtaDxeQQaSnnX4TnpVjfbT7+q0gygw6e74FC2lQ0tGVZUBvW5rBEHbm+lAQ KNayRE61Rqw2+uC9IFGY/Pc0Tak92IC9x9gw+/t6nuZ7ioccBiltwbe7ehpZNf0LyZth lnUAbos016NcwqjryvM0wzJRfGMJC7O/KdvhXPb4K32nNNED2DlRYQMEzyiAuGA+hCYu A/zErWZTquX8oK5WnORGa8oniE9kimj7tvcjmMg/qUcwS6tyxBoPmfITMlJ2jMfMtSKm PkeCu9Slv9YXK83Yp47bxGod3DI6foG1WDZ4Qu5S51xq8R4RtKVJBSKwc6OCiTYdMTFw jI+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736045533; x=1736650333; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :mime-version:message-id:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=TYn3W1dDrfsPK7DEpP2DitIJR/82bjH5cihKblylHmE=; b=bSy+E4JEwbHe+cnntaeHgVTbFHqrse+mJIhPIyh+oeuNmSC6MSNKhoMrDRP4Q5u80r EuSG5A0aT+9EkzTg0+7THnB6TOMIfVH/izr2GJycRAuRSbh977eAI33ybdzr9fozO63m ChnGxbptZioazjCY7vhRJkQYc/Rd7PhDzxvwq0duAft5ZI99NjVAswZemtGPywAGiTQ/ 0C0s3cAgF7aMjB5b04PKdX0W5FaVUhcG0TSP82mj5nAIM8qaqWI3EJi54t9q1uufkObn 4OGQ0r/VLBvEoaJhWzOE1uNED5OXvebCq+T81l7OAEnargbW5vGLqO1ehBYpZqG9cT3B s+VA== X-Forwarded-Encrypted: i=1; AJvYcCVmZ0bJAAebGt6elTemfRYl4P/6/7fFliLs4s9fP4cRad55ddGpssxeF3FUw6hcezt18qcvAxLN7+n0g0c=@vger.kernel.org X-Gm-Message-State: AOJu0YyTQ2w1FJOcmaCjT39Dy2csF26+tXUft9OegrNqQCudLdUz0Efu xqSqp1a84OTBUmO4np9iS6KZR3Y1E0Na8ZmwgEUIjv+WUlRRlyMd+0+KqdnGHg== X-Gm-Gg: ASbGncvkkgd6u626bUg7acNx+gN6u0+aUoj9kau3zRTK2+VRnUjLBxs48CaTblHxPz/ uoBt4Dlrt+ztGJG3X29iD5l/viItYH8gnADejid4gQA7xvQuZlfvcQBqt2krsDymurWSljw0vse kKHKitsqFSSU2XD6x96CyXvUpMSbJPq2Fp+88/8TTsVnavmziLdAMb43EhThNnAxadAVp8FUIyY C/LhggSWCimhwDsiAHTC4e4wdwY9u9coSF0oNWU+MH2otVkNPY= X-Google-Smtp-Source: AGHT+IFGYNQHPVzW6g3px+M9lSt+KEfxPCyKFIoAQxXMSJm7YBYmrIZwyfYjApa4l/M+SmZddJollw== X-Received: by 2002:a05:6214:234f:b0:6d8:f611:3af0 with SMTP id 6a1803df08f44-6dd233af13fmr842647616d6.48.1736045533264; Sat, 04 Jan 2025 18:52:13 -0800 (PST) Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6dd1810dca4sm157322946d6.47.2025.01.04.18.52.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jan 2025 18:52:12 -0800 (PST) Date: Sat, 04 Jan 2025 21:52:12 -0500 Message-ID: <1e9b49e3e80d71ab8a34f7d873614908@paul-moore.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=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: pstg-pwork:20250104_1133/pstg-lib:20250104_1133/pstg-pwork:20250104_1133 From: Paul Moore To: Colin Ian King , James Morris , "Serge E . Hallyn" , linux-security-module@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] security: remove redundant assignment to variable rc References: <20241112124532.468198-1-colin.i.king@gmail.com> In-Reply-To: <20241112124532.468198-1-colin.i.king@gmail.com> On Nov 12, 2024 Colin Ian King wrote: > > In the case where rc is equal to EOPNOTSUPP it is being reassigned a > new value of zero that is never read. The following continue statement > loops back to the next iteration of the lsm_for_each_hook loop and > rc is being re-assigned a new value from the call to getselfattr. > The assignment is redundant and can be removed. > > Signed-off-by: Colin Ian King > Reviewed-by: Serge Hallyn > --- > security/security.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Merged to lsm/dev, thanks. -- paul-moore.com