Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3055336lqo; Tue, 21 May 2024 05:48:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpdcgUiFXsXqMqWxV0i/M3DVqs7PlvLcIOkDhAoM/nyFb7e5HU5+mLwRf/7Nntb1Od2++TUq4JVaNNuFDuGdqURr1YbrYYfs7t//lOLA== X-Google-Smtp-Source: AGHT+IEOBRgUE98Le0mnm+Ykv3Ag7UZ2sRdrP0l6u4GkwQ3ONWC7t4ChYlV/4ydtf8OAWdLCdWWh X-Received: by 2002:a17:907:7757:b0:a59:c9ce:3389 with SMTP id a640c23a62f3a-a5a2d673aa6mr1999742866b.67.1716295731222; Tue, 21 May 2024 05:48:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716295731; cv=pass; d=google.com; s=arc-20160816; b=YrDLi8+XrLFJKbK3388eisvINM2bmq2gk7Yle43WwpPQ2ba0BV+8Xv5oBilBqqHqLU Sng2jVKywHmpcReM7sbsqU1ipGwjUmD06e6VHlRn2iE39ZmAy/nRsG1UhfEvePAtGOUI PCRuxIp0KJFKkL7IaCqOeWsOEqj9wJ9gKKMMf1mhewblpS/Ra9wLvtCWYRWWRGylk68T hgkt2oT45B/SspF5qXSLmYmHMB50gMKeXniTI90HPRjQEYBpjwBOGgYQp73WYWDnJxFx 7ZDYXhdegC6RsPdyik4HOtFQnFOP9SuGC5GDRthQOhVsvgbVYDgKn+nQJNTesO8Rv9Xb inSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=ZKWV+AsBJjmDRa8bjqWRom+SbZLV0WLxFg7rfkNBR3Y=; fh=HRwWUfbMu6YAyC4vn6AdUsSGqtJ5265eDpWfzy2S9Tg=; b=YxgqDmPMBuHY8XOR9Zlh0yUJyrBd+U+EHhSX07TM9YBydI/sZXjsAHNcVFWtvVTEGY UiNa6k+E1Zvm04TTF9Z7gCCz1PldqvnuVKC5tv+xNHoL87HDfeCTklbL3jwIkcAHj5hE PPW0FO56YgEOHzxJQyDLKEpE191I2JK5Pl+bgbQ5dJrs4qlLQ1XKIbW+zeT/wG6WACWA 28Q8u0egaaKy0dkkv+wLtmOkdP569Xd3X2ygdMpmRD30N0Evd2e5W+SldyayQJ9dYLbu Tzll7BM5Upoo1l7kXLmEN2cB2QkX8SvWuouIvoNPtlQD+DROWJwQU5Bo3u0itTaBSU0y 9T7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=qc3s0X63; dkim=pass header.i=@suse.com header.s=susede1 header.b=FKbQfGhk; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-184961-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184961-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a2e6518d3si1307887566b.986.2024.05.21.05.48.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 05:48:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184961-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=qc3s0X63; dkim=pass header.i=@suse.com header.s=susede1 header.b=FKbQfGhk; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-184961-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184961-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 am.mirrors.kernel.org (Postfix) with ESMTPS id ED5291F2309A for ; Tue, 21 May 2024 12:48:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D5BA77112; Tue, 21 May 2024 12:48:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="qc3s0X63"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="FKbQfGhk" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 34833770F0 for ; Tue, 21 May 2024 12:48:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716295717; cv=none; b=JJYazLC/XN7FMDBzp7JMToiPAn9AGjnyJGtg3Da8YYaYcljlZh95ftCW7iL0cacgdHYcsSCNDaI7DEVHivuaZEXUc43kveRCh/KcSVoGvPNlO2rOGg6kf6bQ/xBbJsGqFm+x4FlctJR2YqbRGjGeFhukJfBRuHBgF/nYk8ML97A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716295717; c=relaxed/simple; bh=kJPwlfNSt4lRbMzy2in8uS3czPJ6Spymu1LJUHyk+9s=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=B+MOsUPNcTB3yqD4KGgKwHxdHmbXBptGWQ3Y54+qshaZ9Dh8AC+mSo0qOkFX+L00dk1sq8wwvaBqASigtMv/GWbZufKQ/KxdYHqsZBIu4fuZgkpRjf8KtZBx5RMZCrAbGngCzCMCTMUTH5+V6ZjG6sVQBC3rYUxAx5B0u0srgIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=qc3s0X63; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=FKbQfGhk; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7751222A0A; Tue, 21 May 2024 12:48:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1716295714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZKWV+AsBJjmDRa8bjqWRom+SbZLV0WLxFg7rfkNBR3Y=; b=qc3s0X637V/prCNm5tfNlWU8gicAYq4ROc9Scf8R0WetejpruCvwz8dKKp6L6wwfWVAegZ EdNmJ3+i2zw+M2HeeQ2qTsZe8k97OTfd9gv+0alnFhYPvaXIaqDeMYoWJl4IbpgR8yNd2N KwMKmgqSRznYnkTOfwekLdaMYeHZeUI= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=FKbQfGhk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1716295713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZKWV+AsBJjmDRa8bjqWRom+SbZLV0WLxFg7rfkNBR3Y=; b=FKbQfGhkXLBEa9IxXF0SYFPvBAq0DI9YgCNRbHAV9V30vvddusQ0UMw2K5flfZGyRmNLCv hE26In06PAX+QdgNf1+CG0+I7mzEbGzEJDNkHG9wzJq3kcxU4SnI8Tw34Z+bKUIbfXq9Wn x0zoYXOkFeW/b7Am6sIWUmXNUBOlWDI= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4472513A1E; Tue, 21 May 2024 12:48:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id XUh1DiGYTGbmOQAAD6G6ig (envelope-from ); Tue, 21 May 2024 12:48:33 +0000 From: Nikolay Borisov To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Nikolay Borisov Subject: [PATCH] x86/cpu: Consolidate identical branches Date: Tue, 21 May 2024 15:48:32 +0300 Message-Id: <20240521124832.486390-1-nik.borisov@suse.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: X-Spamd-Result: default: False [-2.03 / 50.00]; DWL_DNSWL_MED(-2.00)[suse.com:dkim]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; BAYES_HAM(-0.02)[54.33%]; MX_GOOD(-0.01)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.com:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:dkim,suse.com:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Action: no action X-Rspamd-Queue-Id: 7751222A0A X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Score: -2.03 It's pointless to have 2 identical branches one after the other, simply collapse them in a single branch. No functional changes. Signed-off-by: Nikolay Borisov --- arch/x86/kernel/cpu/common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 69265c0acaea..369037a166fd 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1732,12 +1732,11 @@ static void generic_identify(struct cpuinfo_x86 *c) { c->extended_cpuid_level = 0; - if (!have_cpuid_p()) + if (!have_cpuid_p()) { identify_cpu_without_cpuid(c); - - /* cyrix could have cpuid enabled via c_identify()*/ - if (!have_cpuid_p()) + /* cyrix could have cpuid enabled via c_identify()*/ return; + } cpu_detect(c); -- 2.34.1