From nobody Sun Nov 24 21:26:35 2024 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.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 EF27215AAD9 for ; Sun, 3 Nov 2024 08:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730621696; cv=none; b=ddmNQRdVTGKE2zratp3Jwq1s2JPE2noDQ87JggiWu4q1bEWjo8yeDB9QNcBtt2wOH6XGqfUOokY1xEmhk/NjvxQRFvZ5X7EkRvkn/Mx2cjmdfR0+b1PPAnIeF66/cVg42pWtDvsbsEENs1myRp0+APKeOCZofnksh20/NZavR1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730621696; c=relaxed/simple; bh=sJQBtHHCyUD4fx57VPvGK7t1PMtZgvKNa+0f3DpKnsI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hKN55XS5+h803kPZloemkLoUJod0Y9/uhUzFMLeqwG5/kZ9vVrws4aTqCf8oUJuXqwb0hPeZRHfd7nWB7r4dCS6a7hzZ+iCfsw8X0hNSGjQcvbnAlfV8qW4Fwng/JFeIgADG8dRG3wyPLLFVa/Y/gTVAjcBaiBIO/WaRRHeDBmI= 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=SVG4BueB; arc=none smtp.client-ip=209.85.208.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="SVG4BueB" Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5ced6a3f246so65795a12.3 for ; Sun, 03 Nov 2024 01:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730621693; x=1731226493; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SKRocKMvsGz4cOULrqNXkHoL0rqs+NrAAxU47zmH+UY=; b=SVG4BueBKTF+Pf0z3RfrfWDx10J9gM1ZPzJLTg9WxQiVS+Z13HjixJirTbU2LiHxwy TsJGdyQkqKkA2VkHdOOOGtGe6Cs73+jNWqRKhGj+LfwjVdIAIMWZFt4vQJf0QDRl9nIX RLKIeE6VFxsOwU8H95Et4F1LBI+69yNhlitU1aQBp/5gAwzEwkYF2yhQDxaRGx3RGr9K lQFUwA939vmgZtmGiNZ14aowocmKQ5VQ9BOn/kS7r+bwfqEkDRSXNRrzcdKWn4gvry39 QPC69Ebrk/OBcQu7dSewpdXwvlMYH5lrW1kpTgwDKD5ToZUynTsDOvnMq4ZUl5AfVaqp YRvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730621693; x=1731226493; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SKRocKMvsGz4cOULrqNXkHoL0rqs+NrAAxU47zmH+UY=; b=gdGDfZ9mnubEjJkoHL24kTaKyqYQO+W4XU+l77uzK+lFbJz31YzP2JG6ClGGUe5RmC UVLGhkcyhypKj5lKfEuuvJRK1jiTts1dvMkBFnPCuB5IojHGIqgz6A5M3+bk2/ZeOt0Y jzFDe6FpcSzxBnMubTL2ZfKAk2zHNerPn+MgqP/PBJ7KcINpFi0frVeBOfOTmXjecgKW LfqZyy41Gd5GHTk+5Y19S/BGV1+mPHkZZx+O/siiyscZRRsUPrhlcGZfvzCNy0baGXGi oU1fA55+MUHC/sktcC1ACaVpDNci4TjE+c4vxcYPDRyRGR3V/4DDytSKcSTlEDNnTlIK 47/A== X-Forwarded-Encrypted: i=1; AJvYcCUUBZZPgou5AVpbNpHVj5xBe0NyXRbN1Pp1Mc3IeHtIA7jp1FSTtFfF4TwFxB4RMTRe7TXWo9m5WRubnK4=@vger.kernel.org X-Gm-Message-State: AOJu0YwkfdfE744vkkjke4ystvt+JKQ9lWvhkM6GeOrl31keUznUJC6k 5gdTu1Y7CFd/wDHSo8pTWy9zJujEhEMfbe4Y0Nuss87bBFbTiRl7 X-Google-Smtp-Source: AGHT+IEUdwUv9MdZb3kct+QldHfpcsuY/9p0YeIRb0fwCu+mPP3498mIgN9ACUM2AetSDqcm1a3iow== X-Received: by 2002:a05:6402:2114:b0:5ce:d028:e11 with SMTP id 4fb4d7f45d1cf-5ced0280e56mr2014148a12.17.1730621692863; Sun, 03 Nov 2024 01:14:52 -0700 (PDT) Received: from kernel-710.speedport.ip (p54a0712c.dip0.t-ipconnect.de. [84.160.113.44]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ceac789152sm3097882a12.43.2024.11.03.01.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 01:14:52 -0700 (PDT) From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Philipp Hortmann Subject: [PATCH 02/13] staging: rtl8723bs: Remove #if 1 in function hal_EfusePartialWriteCheck Date: Sun, 3 Nov 2024 09:14:23 +0100 Message-ID: <2eea90fbdc2ef0ef5c8a224330558ccdefdfdf5b.1730619982.git.philipp.g.hortmann@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove #if 1 in function hal_EfusePartialWriteCheck to shorten code. Signed-off-by: Philipp Hortmann --- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 53 ------------------- 1 file changed, 53 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/st= aging/rtl8723bs/hal/rtl8723b_hal_init.c index be4cc8fc5696..2659999404a3 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -1327,61 +1327,8 @@ static u8 hal_EfusePartialWriteCheck( } =20 if (efuse_OneByteRead(padapter, startAddr, &efuse_data, bPseudoTest) && = (efuse_data !=3D 0xFF)) { -#if 1 bRet =3D false; break; -#else - if (EXT_HEADER(efuse_data)) { - cur_header =3D efuse_data; - startAddr++; - efuse_OneByteRead(padapter, startAddr, &efuse_data, bPseudoTest); - if (ALL_WORDS_DISABLED(efuse_data)) { - bRet =3D false; - break; - } else { - curPkt.offset =3D ((cur_header & 0xE0) >> 5) | ((efuse_data & 0xF0) >= > 1); - curPkt.word_en =3D efuse_data & 0x0F; - } - } else { - cur_header =3D efuse_data; - curPkt.offset =3D (cur_header>>4) & 0x0F; - curPkt.word_en =3D cur_header & 0x0F; - } - - curPkt.word_cnts =3D Efuse_CalculateWordCnts(curPkt.word_en); - /* if same header is found but no data followed */ - /* write some part of data followed by the header. */ - if ( - (curPkt.offset =3D=3D pTargetPkt->offset) && - (hal_EfuseCheckIfDatafollowed(padapter, curPkt.word_cnts, startAddr+1,= bPseudoTest) =3D=3D false) && - wordEnMatched(pTargetPkt, &curPkt, &matched_wden) =3D=3D true - ) { - /* Here to write partial data */ - badworden =3D Efuse_WordEnableDataWrite(padapter, startAddr+1, matched= _wden, pTargetPkt->data, bPseudoTest); - if (badworden !=3D 0x0F) { - u32 PgWriteSuccess =3D 0; - /* if write fail on some words, write these bad words again */ - if (efuseType =3D=3D EFUSE_WIFI) - PgWriteSuccess =3D Efuse_PgPacketWrite(padapter, pTargetPkt->offset,= badworden, pTargetPkt->data, bPseudoTest); - else - PgWriteSuccess =3D Efuse_PgPacketWrite_BT(padapter, pTargetPkt->offs= et, badworden, pTargetPkt->data, bPseudoTest); - - if (!PgWriteSuccess) { - bRet =3D false; /* write fail, return */ - break; - } - } - /* partial write ok, update the target packet for later use */ - for (i =3D 0; i < 4; i++) { - if ((matched_wden & (0x1<word_en |=3D (0x1<word_cnts =3D Efuse_CalculateWordCnts(pTargetPkt->word_en); - } - /* read from next header */ - startAddr =3D startAddr + (curPkt.word_cnts*2) + 1; -#endif } else { /* not used header, 0xff */ *pAddr =3D startAddr; --=20 2.43.0