From nobody Thu Nov 14 18:05:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1708416497; cv=none; d=zohomail.com; s=zohoarc; b=IquOTJck/5UL073l+DTJVv+ehcVsFfXUQb1jp+n1cnK+9rZ+OjeEOCLcUabjOn0SAxorskWYK0uwkTLe4IUNsblNjy8FAlRhcFgKE63t9DggQ72IHKt0xNtyMNlq2j+pBeNnlL8I+es/5gbek58B2QgqpKp5afRIDNd431KufOM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708416497; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=g73OzMwU0CCIScO+4S6Qdh+LHTOWNxgg7pWe0LAuiOs=; b=JByIOF5wM0Tyz5Y5J5QwHsyPIfNpzM+teqfxJgFmW1147dZxHzxxyS95S9OFOEG4rJmZtBjQJxkRR5BMiRKRGC+D+s2zEX87U0ddlNi4wSsBKhfV8+cbhiVkj7Ra/c2BwP1/M0sMZWJA2T6A9ZtyTKs9OHfj5VteH2yx7MjRBXw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708416497926150.91321255522212; Tue, 20 Feb 2024 00:08:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcLAQ-00060f-R1; Tue, 20 Feb 2024 03:07:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcLAP-0005m7-33 for qemu-devel@nongnu.org; Tue, 20 Feb 2024 03:07:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcLAN-0000ac-Fy for qemu-devel@nongnu.org; Tue, 20 Feb 2024 03:07:52 -0500 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-653-xtKDLGmeM7OqnAzmlVx2sA-1; Tue, 20 Feb 2024 03:07:49 -0500 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-564cb5b2bc5so183383a12.0 for ; Tue, 20 Feb 2024 00:07:49 -0800 (PST) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id vg8-20020a170907d30800b00a3d2fe84ff9sm3707394ejc.36.2024.02.20.00.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 00:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708416470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g73OzMwU0CCIScO+4S6Qdh+LHTOWNxgg7pWe0LAuiOs=; b=f/ViD/yrYNJ60S0c0UH5NbtJX6HHtaU6xuzpccNhfTMlwPzpDenMwUD5EZ0kJu7Cd9CRCB YFOI4QJlkP+aucqhsPnmm7kt7mWsGJiMH06edQExhYW5paMaeulS/hO0n+IZbtUDfq0jFa P5WEoAbKSlF+iGO58KxBZa5oZYoHjWQ= X-MC-Unique: xtKDLGmeM7OqnAzmlVx2sA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708416467; x=1709021267; 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=g73OzMwU0CCIScO+4S6Qdh+LHTOWNxgg7pWe0LAuiOs=; b=uuX2Z1Ofc0XEz89Li/Zt9eA+DYdpR+dhOsRX/0AV1BRo4K5ubYqUSIS5OnRkwjP6av h+dSeiPlKXzNMSV12nSYrUxbrbOF0idaj/OoMawqSbESqaLRNLsD2NKc014a6w2nf0be GfDm97J6QfRo2ZlobNpG5pZJb7PJxfEvxGWLhWMFX7cO3keLQa7mDeFzdtDtCQGsBSg2 q1Qb/PMVbc2peqHD1GfFZnT2fBS3BoKtnhRktDHD/IRMeNUmAc+d2rhcIhHSzpFnZkCQ 1ddzEoio7t70Gvz3jXbQVCb4VeYTNcIaz4L83yoxK360LKHjgwyJBmwzgfYrffvn4wcl yWJA== X-Gm-Message-State: AOJu0Yw9B5JhZ7w8wxGVITNuUUxQ4w0kk5eWhLHtADNfgq5dNr0WhXlJ 4Tyf0NqrchmeCjh6mdA1uP2hRfdLlHxgTOUbnZzinbOMh86XtuAeSSp1AIlq5wPRziMqQlx8zxK hRkZ7HYikJPHnZm5MCeDLF9+oaE9Dl24KlUohlFeKl6gsu4x5gZGqbSa3ipzw8yMWu1Xo68ujq8 3CoFdeNfmRiTAq94ippue50k76R0yiPpOVudse X-Received: by 2002:a17:906:bc45:b0:a3e:71eb:c54c with SMTP id s5-20020a170906bc4500b00a3e71ebc54cmr4775007ejv.49.1708416467227; Tue, 20 Feb 2024 00:07:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEn6xRmQYWH+PkgaWzzGQit0KqY8UyddgUIje8BKpTV5RxmVZKm4yUzdKs8gb6M95XuvsgolA== X-Received: by 2002:a17:906:bc45:b0:a3e:71eb:c54c with SMTP id s5-20020a170906bc4500b00a3e71ebc54cmr4774976ejv.49.1708416466759; Tue, 20 Feb 2024 00:07:46 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Bernhard Beschow Subject: [PULL 11/17] smc37c669: remove useless is_enabled functions Date: Tue, 20 Feb 2024 09:05:52 +0100 Message-ID: <20240220080558.365903-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220080558.365903-1-pbonzini@redhat.com> References: <20240220080558.365903-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.072, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1708416498305100013 Content-Type: text/plain; charset="utf-8" Calls to is_enabled are bounded to indices that actually exist in the SuperIO device. Therefore, the is_enabled functions in smc37c669 are not doing anything and they can be removed. Reviewed-by: Bernhard Beschow Signed-off-by: Paolo Bonzini --- hw/isa/smc37c669-superio.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/hw/isa/smc37c669-superio.c b/hw/isa/smc37c669-superio.c index 18287741cb4..388e2ed9371 100644 --- a/hw/isa/smc37c669-superio.c +++ b/hw/isa/smc37c669-superio.c @@ -14,11 +14,6 @@ =20 /* UARTs (compatible with NS16450 or PC16550) */ =20 -static bool is_serial_enabled(ISASuperIODevice *sio, uint8_t index) -{ - return index < 2; -} - static uint16_t get_serial_iobase(ISASuperIODevice *sio, uint8_t index) { return index ? 0x2f8 : 0x3f8; @@ -31,11 +26,6 @@ static unsigned int get_serial_irq(ISASuperIODevice *sio= , uint8_t index) =20 /* Parallel port */ =20 -static bool is_parallel_enabled(ISASuperIODevice *sio, uint8_t index) -{ - return index < 1; -} - static uint16_t get_parallel_iobase(ISASuperIODevice *sio, uint8_t index) { return 0x378; @@ -53,11 +43,6 @@ static unsigned int get_parallel_dma(ISASuperIODevice *s= io, uint8_t index) =20 /* Diskette controller (Software compatible with the Intel PC8477) */ =20 -static bool is_fdc_enabled(ISASuperIODevice *sio, uint8_t index) -{ - return index < 1; -} - static uint16_t get_fdc_iobase(ISASuperIODevice *sio, uint8_t index) { return 0x3f0; @@ -79,20 +64,17 @@ static void smc37c669_class_init(ObjectClass *klass, vo= id *data) =20 sc->parallel =3D (ISASuperIOFuncs){ .count =3D 1, - .is_enabled =3D is_parallel_enabled, .get_iobase =3D get_parallel_iobase, .get_irq =3D get_parallel_irq, .get_dma =3D get_parallel_dma, }; sc->serial =3D (ISASuperIOFuncs){ .count =3D 2, - .is_enabled =3D is_serial_enabled, .get_iobase =3D get_serial_iobase, .get_irq =3D get_serial_irq, }; sc->floppy =3D (ISASuperIOFuncs){ .count =3D 1, - .is_enabled =3D is_fdc_enabled, .get_iobase =3D get_fdc_iobase, .get_irq =3D get_fdc_irq, .get_dma =3D get_fdc_dma, --=20 2.43.0