From patchwork Wed Apr 19 18:21:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zihan Yang X-Patchwork-Id: 9688607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1E628602C9 for ; Wed, 19 Apr 2017 18:22:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14AD828387 for ; Wed, 19 Apr 2017 18:22:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08B8C2843B; Wed, 19 Apr 2017 18:22:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A892D28387 for ; Wed, 19 Apr 2017 18:22:53 +0000 (UTC) Received: from localhost ([::1]:49854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0uFg-0001v2-VF for patchwork-qemu-devel@patchwork.kernel.org; Wed, 19 Apr 2017 14:22:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0uEn-0001s5-Fl for qemu-devel@nongnu.org; Wed, 19 Apr 2017 14:22:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0uEk-0003qa-CG for qemu-devel@nongnu.org; Wed, 19 Apr 2017 14:21:57 -0400 Received: from mail-yb0-x244.google.com ([2607:f8b0:4002:c09::244]:34434) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0uEk-0003qR-7A for qemu-devel@nongnu.org; Wed, 19 Apr 2017 14:21:54 -0400 Received: by mail-yb0-x244.google.com with SMTP id l192so1163304ybl.1 for ; Wed, 19 Apr 2017 11:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=G+6CFTFETde7kivuHWOfeJmrZwsRID8oF0QaU8V093M=; b=C9/occ95NzJn5k50ZGkcBgeY+kL8C+OJd8bTP8wuiQcAVI93lpIkKZDgAwzh4J7wyi h04zw9QrBx4coG1zJ/TCtTf0/iYxa6x1ytepbXkl/qpIt3m6AKcGCNSOiCEzP+KMWlHv fmToyFBLmMgtuOmNv7DkcgSIWw13lTb4G+WDKQwxN+1o2lzPSrjsxXyp4DxETEnKYVLJ HP9v/N2wtLoK89ZxKU/acq/PuFsHz7ABMeKG7N176CCV7ka/Rvo7GFuyQZrAt+kjV+t5 T/o5J9bPSCFJQ3qDb5OnPYikQpuf8infLWkkU+vnTSKeT2WEUVjmA5CAVg2rLPKVZtLY 5AVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=G+6CFTFETde7kivuHWOfeJmrZwsRID8oF0QaU8V093M=; b=M0Rg+kiRTDswOqI+8pAwt9KsXPvlFlPP17CX7ZgaygppnmPV5unXUB9nNLTvHRXrlZ 1N47fTqfb6+YiCcSBYpLV/9+leFOhimdl/qvg+veLJAsWCyKQIoJNkUpnLKVNGvo9GBd hiSMvlKmS+qrBJ/aEfxisUEvFO2KQj0Z+CGnN06tr/hdPGLtaEAE/4+GH06H09CRpEIW QPvqpK2GdR08ZQsRrL5olk7rg+OD/XgdMCWH+VDo5SX1rKAQIIb7pR2/ulN7brSGLm+n IfqpthVr+1oTKZjV+ECkGFv1gglsYuCAXJsJa8z0wDAEEEs2WACfqeeCzuGv379146FL MEJQ== X-Gm-Message-State: AN3rC/6yvWcr6ttHPNS91Vt9uVNNqq/x6HnoC4kzb13MAkf2/5iCpPqc HZKitVtp5Z2w6Q== X-Received: by 10.84.134.131 with SMTP id 3mr5399088plh.116.1492626113478; Wed, 19 Apr 2017 11:21:53 -0700 (PDT) Received: from fma-dfsg.ipads-lab.se.sjtu.edu.cn ([69.85.85.101]) by smtp.gmail.com with ESMTPSA id l7sm5904575pgn.10.2017.04.19.11.21.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Apr 2017 11:21:52 -0700 (PDT) From: Zihan Yang To: qemu-devel@nongnu.org Date: Thu, 20 Apr 2017 02:21:29 +0800 Message-Id: <1492626091-30531-1-git-send-email-tgnyang@gmail.com> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c09::244 Subject: [Qemu-devel] [PATCH 1/2] hw/char: remove console_exit function in sclp X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , Christian Borntraeger , Zihan Yang , Alexander Graf , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Currently, the console_exit function in sclpconsole-lm.c and sclpconsole.c does nothing, just remove them. Since there is a NULL check on the DeviceClass exit callback as suggested by Frederic Konrad, it should be safe to simply remove them. Signed-off-by: Zihan Yang --- hw/char/sclpconsole-lm.c | 6 ------ hw/char/sclpconsole.c | 6 ------ include/hw/s390x/event-facility.h | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c index 07d6ebd..86ddda6 100644 --- a/hw/char/sclpconsole-lm.c +++ b/hw/char/sclpconsole-lm.c @@ -318,11 +318,6 @@ static int console_init(SCLPEvent *event) return 0; } -static int console_exit(SCLPEvent *event) -{ - return 0; -} - static void console_reset(DeviceState *dev) { SCLPEvent *event = SCLP_EVENT(dev); @@ -349,7 +344,6 @@ static void console_class_init(ObjectClass *klass, void *data) dc->reset = console_reset; dc->vmsd = &vmstate_sclplmconsole; ec->init = console_init; - ec->exit = console_exit; ec->get_send_mask = send_mask; ec->get_receive_mask = receive_mask; ec->can_handle_event = can_handle_event; diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c index b78f240..e916cac 100644 --- a/hw/char/sclpconsole.c +++ b/hw/char/sclpconsole.c @@ -246,11 +246,6 @@ static void console_reset(DeviceState *dev) scon->notify = false; } -static int console_exit(SCLPEvent *event) -{ - return 0; -} - static Property console_properties[] = { DEFINE_PROP_CHR("chardev", SCLPConsole, chr), DEFINE_PROP_END_OF_LIST(), @@ -265,7 +260,6 @@ static void console_class_init(ObjectClass *klass, void *data) dc->reset = console_reset; dc->vmsd = &vmstate_sclpconsole; ec->init = console_init; - ec->exit = console_exit; ec->get_send_mask = send_mask; ec->get_receive_mask = receive_mask; ec->can_handle_event = can_handle_event; diff --git a/include/hw/s390x/event-facility.h b/include/hw/s390x/event-facility.h index def1bb0..1a32f3a 100644 --- a/include/hw/s390x/event-facility.h +++ b/include/hw/s390x/event-facility.h @@ -162,7 +162,7 @@ typedef struct SCLPEvent { typedef struct SCLPEventClass { DeviceClass parent_class; int (*init)(SCLPEvent *event); - int (*exit)(SCLPEvent *event); + void (*exit)(SCLPEvent *event); /* get SCLP's send mask */ unsigned int (*get_send_mask)(void);