Received: by 2002:a89:2d5:0:b0:1ef:f8eb:5d24 with SMTP id d21csp74207lqs; Sun, 17 Mar 2024 11:06:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWggUeLrc77MAOYuujoAYJdO6TL6woaZwmVCf+0Zqlo6j7XlQObschA0ai0eEc6IR66W84IFhvculvzLvu4ZfrzKhynOOFScYwR8Oq+bA== X-Google-Smtp-Source: AGHT+IF92N+/TQLgKGlAQhW5NMb3f7K4N40lg6Qtizw7bw+b6aB420k/ZnBUNjOqSqOLMv2ulu// X-Received: by 2002:a17:903:11d1:b0:1dd:a3d6:3af8 with SMTP id q17-20020a17090311d100b001dda3d63af8mr11104805plh.31.1710698793002; Sun, 17 Mar 2024 11:06:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710698792; cv=pass; d=google.com; s=arc-20160816; b=ybMQpW8fn4dXIBHyictkhmEXAFxZ/qfryqwwk0HHpM5Jd94Eo9x2wMLSn3hvG8/G8b GOeZjMwRpkGZoAGye58eeyrOCaUN2B0YOv7EC4cSKyeB1Gn2z56CKvWYpU0LwuhHrflF 63GdMV7sNrENZUS5qdJPzMV8zVq0udlGVPimuWhjqzm/m1NyGZ/siZJKo8VcHECWi3Lc YJzYeDzswnETgk+GG/cAhRo+ky/a3DumrgKgLkH+HSjQFRSiHV/bicuDYcOYQ8I0s/4q EX8TGlnf8JGnXvEn90zgvW0IKJVNBs7GfBKcFHXZrrHpXOn+DQnpV7xXpj1he0ftv1At zi5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=ccHkhmsb5PGqPme4pfAQtFz0/1A/f06u4lt3vBFDYpM=; fh=4ESkXNRmpGd72gMoQC0REnwl4itnt/Te7z/D5gk+QTQ=; b=w/13o5oN7GKhC4aQk4L496EvnjDMH67X8xF5dZo9U1YfBAGR1pOA7wUTEL2QeVFmV6 llGBO7o7jrPCwnACRRUf7CiAIzELftU77OJ3Wf4Of2ykLKul7rwD19Y6R+PH25mnwpbO SnFS2g78kNyI9bTm8Ds1Zdj5+KckoJL3S6Gi235S8TEP0K6A72gFnJOjH9EgBxSE/ssC p9n9e/Ld7zrs28+qchewnA7xt+JmjvZkX1crQj3ajcCWsQCV6HkPT4CuwKsZVKdVYMUr lVD8d7i0qnRXKroRE/mmoFznRMQGccljaupUY29DOIpUgCFumhPaAm57FKLHIgf+JHNw aCwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ayn0HhU1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-105491-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b3-20020a170903228300b001e026392e6esi487162plh.8.2024.03.17.11.06.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 11:06:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105491-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ayn0HhU1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-105491-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9A5F9B20CBF for ; Sun, 17 Mar 2024 18:06:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7536F1CFB6; Sun, 17 Mar 2024 18:06:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ayn0HhU1" Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (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 43EE11CF8A for ; Sun, 17 Mar 2024 18:06:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710698783; cv=none; b=Q8z+WXr0kA+buiQksIfF+w0GTJkLdm22WXHWvZ02KM0BDjnosffRVRctdZkzy17Cn685+otxV0r8lCpdfLhba6+wvDBRE6qHBX/GOptPhFIEqRGrynSjLTf4UlCYvK6yagXy/i7I9vgaVOWiYS9fcQT3j6NTMeCN+5BLLQKOsOA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710698783; c=relaxed/simple; bh=xMwMkKngWMgejOhxDouCnhEyArbQUSNsTw3WxpvWneY=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=KWtQ5F8qTkL5zNA8nYU5KDX5iMOCzOatqd/8vOx1KXAgAk+Lcyb3yPVd2Y91VVo7jDJfTjJN22+cdEn/7X5UCF4ZhUZwfjt9uf9T1M11kVCMwvR519hVnH28hzXTm7l4XBIKGvPxwGjZhgXO07aFAcyLkJ0xHnfEvBF8razplts= 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=Ayn0HhU1; arc=none smtp.client-ip=209.85.166.174 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 Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-3667770b8e8so21405635ab.0 for ; Sun, 17 Mar 2024 11:06:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710698781; x=1711303581; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=ccHkhmsb5PGqPme4pfAQtFz0/1A/f06u4lt3vBFDYpM=; b=Ayn0HhU1rb0J0M4GorEhk6i0cmKHiYjqVIyqbt5b+wSUw5J+uQAXOj5zCaotjBE5uv xoYTKLfFT+8BO9CjbwFoSL8gVqTnLEMFiRw7N4m3lsCUeYUrMe3J8S+VmvyqpucHY/7B twbOqUbksnIBlm2zIIzGc/pBf9i2O0xL3ekXIuARkjgAzErrYCTrqlsanqOgGavIWW7D MLnunKtXQO+DAjyqR9Opi4vQgoC8w7bDKdpn1lffV+5TYvt0pUvbyb3i4QttrzcbcwI7 nnFFphqvQRUcLdxe16Yob0Huqf+svBfT9NkfLCZx2jQKt2ICM/qqFf7SUYS8WK7ccw2N 1SNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710698781; x=1711303581; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ccHkhmsb5PGqPme4pfAQtFz0/1A/f06u4lt3vBFDYpM=; b=vV/KJJoLGYCG+fq5dRqQGqOtEHNGZW/IcLgJBaNR0ejLIGaNnoCg4ceHi3MkpOWo/8 A/sN3tfS89MlkqOKT63UlXslmNORaqIoj5URe8pO8IHcWJ+cfYBql/mmI9ybRmFIH785 D/HL43AksQsX0qmUv0FbaZc+wY7OpSLrsmo3GLEe2tqjVmn/qtSE4r91C5uvxIp0JSXV ZCJ7x3aXLGYsVbLdJs3hAxA+crlSbKRDl7ZrZf5w7YP+4SKQJhIrm0VggvpoWKvAy0jp eIeKg1HwQ/eBAXJiL/NvDTqzeHRVEgidEBW4iScGF+zr92NE5raCuW+BJTvbg3jQk5mj 8gXw== X-Forwarded-Encrypted: i=1; AJvYcCXVqyfqoDZOt5LkqV+4a+3BNisigCNQgdowv6uPq7bFZ/ZB1xnWwpM5K+yqeGuL17zs5IhA+DU9c9xL9tT4lC26nrR+JjFWuOGMfn/j X-Gm-Message-State: AOJu0YyC86g7uIWKYsgrdhq/I+1toVZiJT7uYY+s9mW11FqCysc5n7+F 1Rh68IT4gUIej+8T0s2rHwr7PqsxNh52OSbS0w7I9v3OmLX2jPaL X-Received: by 2002:a92:c70b:0:b0:366:3766:6c4b with SMTP id a11-20020a92c70b000000b0036637666c4bmr8740240ilp.16.1710698781203; Sun, 17 Mar 2024 11:06:21 -0700 (PDT) Received: from ayush-HP-Pavilion-Gaming-Laptop-15-ec0xxx ([103.6.158.65]) by smtp.gmail.com with ESMTPSA id k188-20020a636fc5000000b005e438fe702dsm5624183pgc.65.2024.03.17.11.06.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 11:06:20 -0700 (PDT) Date: Sun, 17 Mar 2024 23:36:17 +0530 From: Ayush Tiwari To: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: outreachy@lists.linux.dev Subject: [PATCH] staging: rtl8712: aggregate conditional statements Message-ID: 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 Aggregate the two conditional statements into one conditional statement to reduce code length and simplify the code structure. Signed-off-by: Ayush Tiwari --- drivers/staging/rtl8712/ieee80211.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c index 7d8f1a29d18a..3b7a72bb6fc7 100644 --- a/drivers/staging/rtl8712/ieee80211.c +++ b/drivers/staging/rtl8712/ieee80211.c @@ -147,9 +147,7 @@ static uint r8712_get_rateset_len(u8 *rateset) uint i = 0; while (1) { - if ((rateset[i]) == 0) - break; - if (i > 12) + if ((rateset[i] == 0) || (i > 12)) break; i++; } -- 2.40.1