Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp525077imu; Wed, 2 Jan 2019 11:08:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN5/GZdO0vktLuM6LkQUuBz2n7nJhaW6vvYd+f5XMHNejp2M+P+QinTUb8gRn9TUDEe3iypl X-Received: by 2002:a63:b543:: with SMTP id u3mr14424601pgo.420.1546456116045; Wed, 02 Jan 2019 11:08:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546456116; cv=none; d=google.com; s=arc-20160816; b=K/rkwQ8kl62fgYbNqBoaL34FtV1kf2o7Yq5e8DZFc4l23RgMoaYstROId6sLTCmRby m0Sn7rbOpI0cSScBSMGMH/9Nu5Mu2J8EiOuCjv4cABiWObV0fjMXDJfhf8QSB5PMkpI0 Yn6P63lqsNzOR2HlEd4lpVs7d5ph+/GzwmLATky4Bsx6GjnwABTsTjqy77e+ad4hDvly qivJdy5AfL+u8+DcAQYtbB7Bijg9wmxU1SgCYT/pBJgTceqhO4H6t3ZbA1RCTmytxG8Q Pc/5Ie2bZuKJmrA00KLn7FWt4CAHZDs6HJTJq0l6s0taZeGqPuYcqSBIYoxsN+nvqzIu Cwtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:reply-to; bh=crbm2muFXje+XcgNScZtqZaUkcA8bdRpfV72gFZCV7c=; b=u3ByA9a8uExdcB8zoJwINtuGYn4X8A/D58vqm7jqvGZKvuJShoX7ueWkDU+xotCdPO E2iqPbL6I9febRBoAg95PIar3Dbuc3Cbt5L0meLOFYp4MtKCf5r4XO+sm5AsURS1NA3b YrZiFtmxj96yM1ZzkeXXhkh4T2i6Izr0l+qcJs8riQhzWQMeBBboGeFhP7ai8q3RJlCp XukrCCe7K6DFikpaQ5oAZk6K4RXF3kzhlFi3Jal1eNBH7LW4rXUpZUL+polDuUxvwkbO Jcl4PZC6EWAQPRHoXomByLyRp4euRZAAGbYxriKy8oZ2j963Q+l+h2OXU1pYXpB2wf5M T/vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si49087036pgg.592.2019.01.02.11.08.21; Wed, 02 Jan 2019 11:08:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730488AbfABQvG (ORCPT + 99 others); Wed, 2 Jan 2019 11:51:06 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38788 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729077AbfABQvF (ORCPT ); Wed, 2 Jan 2019 11:51:05 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x02GnHT8078327 for ; Wed, 2 Jan 2019 11:51:04 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2prwy2s0xw-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 02 Jan 2019 11:51:04 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 2 Jan 2019 16:51:01 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 2 Jan 2019 16:50:58 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x02Gov6j3867018 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 2 Jan 2019 16:50:57 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0E7314C04E; Wed, 2 Jan 2019 16:50:57 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 53F7F4C046; Wed, 2 Jan 2019 16:50:56 +0000 (GMT) Received: from [9.152.224.140] (unknown [9.152.224.140]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 2 Jan 2019 16:50:56 +0000 (GMT) Reply-To: pmorel@linux.ibm.com Subject: Re: [PATCH v5 02/15] KVM: s390: coding style issue kvm_s390_gisa_init/clear() To: Michael Mueller , KVM Mailing List Cc: Linux-S390 Mailing List , linux-kernel@vger.kernel.org, kvm390-list@tuxmaker.boeblingen.de.ibm.com, Martin Schwidefsky , Heiko Carstens , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Halil Pasic References: <20181219191756.57973-1-mimu@linux.ibm.com> <20181219191756.57973-3-mimu@linux.ibm.com> From: Pierre Morel Date: Wed, 2 Jan 2019 17:50:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181219191756.57973-3-mimu@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19010216-0028-0000-0000-00000332002B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19010216-0029-0000-0000-000023EF4A88 Message-Id: <0c41bb2c-aa6c-ccbc-752b-c73f74fdd12b@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-02_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901020151 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/12/2018 20:17, Michael Mueller wrote: > The change hepls to reduce line length and > icreases code readability. > > Signed-off-by: Michael Mueller > --- > arch/s390/kvm/interrupt.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c > index fcb55b02990e..9a3aed608914 100644 > --- a/arch/s390/kvm/interrupt.c > +++ b/arch/s390/kvm/interrupt.c > @@ -2886,20 +2886,20 @@ int kvm_s390_get_irq_state(struct kvm_vcpu *vcpu, __u8 __user *buf, int len) > > void kvm_s390_gisa_clear(struct kvm *kvm) > { > - if (kvm->arch.gisa) { > - memset(kvm->arch.gisa, 0, sizeof(struct kvm_s390_gisa)); > - kvm->arch.gisa->next_alert = (u32)(u64)kvm->arch.gisa; > - VM_EVENT(kvm, 3, "gisa 0x%pK cleared", kvm->arch.gisa); > - } > + if (!kvm->arch.gisa) > + return; > + memset(kvm->arch.gisa, 0, sizeof(struct kvm_s390_gisa)); > + kvm->arch.gisa->next_alert = (u32)(u64)kvm->arch.gisa; > + VM_EVENT(kvm, 3, "gisa 0x%pK cleared", kvm->arch.gisa); > } > > void kvm_s390_gisa_init(struct kvm *kvm) > { > - if (css_general_characteristics.aiv) { > - kvm->arch.gisa = &kvm->arch.sie_page2->gisa; > - VM_EVENT(kvm, 3, "gisa 0x%pK initialized", kvm->arch.gisa); > - kvm_s390_gisa_clear(kvm); > - } > + if (!css_general_characteristics.aiv) > + return; > + kvm->arch.gisa = &kvm->arch.sie_page2->gisa; > + VM_EVENT(kvm, 3, "gisa 0x%pK initialized", kvm->arch.gisa); to be annoying, shouldn't the trace be done after the clear? > + kvm_s390_gisa_clear(kvm); > } > > void kvm_s390_gisa_destroy(struct kvm *kvm) > Reviewed-by: Pierre Morel -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany