From nobody Tue Feb 10 06:08:15 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1603191965; cv=none; d=zohomail.com; s=zohoarc; b=iflhLIZk1BJ9pYt7QHuM8bErZeRpcM+wFpNGuqfhQCOpsrzkYqU/2USJrr+X+RySRmHd4jG6gEOSByP/mXuC+r7IMgYU5H5KfkUvuH0TmUdO210lk0Sr1JMdJTqPFoqfq4hiEAV2JOnw6/sJ1UFFOz4wXbE+LYlEvrdHOiiUCTA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603191965; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mePTr0bcvoD6MH4TBveudmbR9JnRQFh7Wh/u+by/r/Q=; b=EZ1rYQI73NBBfQDKfkjg/s8b4q+a6N0g3VnFju6oYZKBUp5QGhreaaDf/EZ/ioSL4Sp36PKLG1EQtuWhazkQYnZGYez7ZJ6YMp81AI43WnnqLusRqrPfV0iRzDQ1wWJhtOQKA7SjiCogr+sX3TyfDhF2BPL84Fluuna2zO7xfpc= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16031919651321014.6410623196005; Tue, 20 Oct 2020 04:06:05 -0700 (PDT) Received: from localhost ([::1]:32914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUpSu-00084l-1V for importer@patchew.org; Tue, 20 Oct 2020 07:06:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUpQt-00061J-HQ; Tue, 20 Oct 2020 07:04:01 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:38616 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUpQr-0006mt-6z; Tue, 20 Oct 2020 07:03:59 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A03BA91E903B23999C30; Tue, 20 Oct 2020 19:03:49 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Tue, 20 Oct 2020 19:03:40 +0800 From: Gan Qixin To: , Subject: [PATCH 03/10] hw/ide/:split some lines containing more than 80 characters Date: Tue, 20 Oct 2020 04:30:16 +0800 Message-ID: <20201019203023.658555-4-ganqixin@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201019203023.658555-1-ganqixin@huawei.com> References: <20201019203023.658555-1-ganqixin@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected 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=45.249.212.35; envelope-from=ganqixin@huawei.com; helo=huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 07:03:45 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com, mst@redhat.com, f4bug@amsat.org, alistair.francis@wdc.com, Gan Qixin , kuhn.chenqun@huawei.com, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" By using scripts/checkpatch.pl, it is found that many files in hw/ide/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin --- hw/ide/ahci.c | 10 ++++++---- hw/ide/atapi.c | 9 +++++---- hw/ide/cmd646.c | 3 ++- hw/ide/core.c | 21 ++++++++++++++------- hw/ide/piix.c | 3 ++- hw/ide/via.c | 3 ++- 6 files changed, 31 insertions(+), 18 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 680304a24c..83bbc7e3df 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1252,7 +1252,8 @@ static void handle_reg_h2d_fis(AHCIState *s, int port, if (opts & AHCI_CMD_ATAPI) { memcpy(ide_state->io_buffer, &cmd_fis[AHCI_COMMAND_TABLE_ACMD], 0x= 10); if (trace_event_get_state_backends(TRACE_HANDLE_REG_H2D_FIS_DUMP))= { - char *pretty_fis =3D ahci_pretty_buffer_fis(ide_state->io_buff= er, 0x10); + char *pretty_fis =3D ahci_pretty_buffer_fis(ide_state->io_buff= er, + 0x10); trace_handle_reg_h2d_fis_dump(s, port, pretty_fis); g_free(pretty_fis); } @@ -1356,9 +1357,10 @@ static void ahci_pio_transfer(const IDEDMA *dma) * The device only sets the 'I' bit in the PIO Setup FIS for device->h= ost * requests (see "DPIOI1" in the SATA spec), or for host->device DRQs = after * the first (see "DPIOO1"). The latter is consistent with the spec's - * description of the PACKET protocol, where the command part of ATAPI= requests - * ("DPKT0") has the 'I' bit clear, while the data part of PIO ATAPI r= equests - * ("DPKT4a" and "DPKT7") has the 'I' bit set for both directions for = all DRQs. + * description of the PACKET protocol, where the command part of ATAPI + * requests ("DPKT0") has the 'I' bit clear, while the data part of PIO + * ATAPI requests ("DPKT4a" and "DPKT7") has the 'I' bit set for both + * directions for all DRQs. */ pio_fis_i =3D ad->done_first_drq || (!is_atapi && !is_write); ahci_write_fis_pio(ad, size, pio_fis_i); diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 14a2b0bb2f..7f346d5d2a 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -378,7 +378,8 @@ static void ide_atapi_cmd_read_dma_cb(void *opaque, int= ret) =20 if (s->packet_transfer_size <=3D 0) { s->status =3D READY_STAT | SEEK_STAT; - s->nsector =3D (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT= _REASON_CD; + s->nsector =3D (s->nsector & ~7) | ATAPI_INT_REASON_IO | + ATAPI_INT_REASON_CD; ide_set_irq(s->bus); goto eot; } @@ -1232,9 +1233,9 @@ enum { ALLOW_UA =3D 0x01, =20 /* - * Commands flagged with CHECK_READY can only execute if a medium is p= resent. - * Otherwise they report the Not Ready Condition. (See MMC-5, section - * 4.1.8) + * Commands flagged with CHECK_READY can only execute if a medium is + * present. Otherwise they report the Not Ready Condition. (See MMC-5, + * section 4.1.8) */ CHECK_READY =3D 0x02, =20 diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index c254631485..c41990f393 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -144,7 +144,8 @@ static void bmdma_write(void *opaque, hwaddr addr, cmd646_update_irq(pci_dev); break; case 2: - bm->status =3D (val & 0x60) | (bm->status & 1) | (bm->status & ~va= l & 0x06); + bm->status =3D (val & 0x60) | (bm->status & 1) | + (bm->status & ~val & 0x06); break; case 3: if (bm =3D=3D &bm->pci_dev->bmdma[0]) { diff --git a/hw/ide/core.c b/hw/ide/core.c index 693b352d5e..b784fff88f 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2017,7 +2017,8 @@ static const struct { [WIN_READ_ONCE] =3D { cmd_read_pio, HD_CFA_OK }, [WIN_READ_EXT] =3D { cmd_read_pio, HD_CFA_OK }, [WIN_READDMA_EXT] =3D { cmd_read_dma, HD_CFA_OK }, - [WIN_READ_NATIVE_MAX_EXT] =3D { cmd_read_native_max, HD_CFA_OK | S= ET_DSC }, + [WIN_READ_NATIVE_MAX_EXT] =3D { cmd_read_native_max, HD_CFA_OK | + SET_DSC }, [WIN_MULTREAD_EXT] =3D { cmd_read_multiple, HD_CFA_OK }, [WIN_WRITE] =3D { cmd_write_pio, HD_CFA_OK }, [WIN_WRITE_ONCE] =3D { cmd_write_pio, HD_CFA_OK }, @@ -2037,7 +2038,8 @@ static const struct { [WIN_IDLEIMMEDIATE2] =3D { cmd_nop, HD_CFA_OK }, [WIN_STANDBY2] =3D { cmd_nop, HD_CFA_OK }, [WIN_SETIDLE2] =3D { cmd_nop, HD_CFA_OK }, - [WIN_CHECKPOWERMODE2] =3D { cmd_check_power_mode, HD_CFA_OK | = SET_DSC }, + [WIN_CHECKPOWERMODE2] =3D { cmd_check_power_mode, HD_CFA_OK | + SET_DSC }, [WIN_SLEEPNOW2] =3D { cmd_nop, HD_CFA_OK }, [WIN_PACKETCMD] =3D { cmd_packet, CD_OK }, [WIN_PIDENTIFY] =3D { cmd_identify_packet, CD_OK }, @@ -2046,7 +2048,8 @@ static const struct { [CFA_ERASE_SECTORS] =3D { cmd_cfa_erase_sectors, CFA_OK | SE= T_DSC }, [WIN_MULTREAD] =3D { cmd_read_multiple, HD_CFA_OK }, [WIN_MULTWRITE] =3D { cmd_write_multiple, HD_CFA_OK }, - [WIN_SETMULT] =3D { cmd_set_multiple_mode, HD_CFA_OK |= SET_DSC }, + [WIN_SETMULT] =3D { cmd_set_multiple_mode, HD_CFA_OK | + SET_DSC }, [WIN_READDMA] =3D { cmd_read_dma, HD_CFA_OK }, [WIN_READDMA_ONCE] =3D { cmd_read_dma, HD_CFA_OK }, [WIN_WRITEDMA] =3D { cmd_write_dma, HD_CFA_OK }, @@ -2056,15 +2059,19 @@ static const struct { [WIN_IDLEIMMEDIATE] =3D { cmd_nop, HD_CFA_OK }, [WIN_STANDBY] =3D { cmd_nop, HD_CFA_OK }, [WIN_SETIDLE1] =3D { cmd_nop, HD_CFA_OK }, - [WIN_CHECKPOWERMODE1] =3D { cmd_check_power_mode, HD_CFA_OK | = SET_DSC }, + [WIN_CHECKPOWERMODE1] =3D { cmd_check_power_mode, HD_CFA_OK | + SET_DSC }, [WIN_SLEEPNOW1] =3D { cmd_nop, HD_CFA_OK }, [WIN_FLUSH_CACHE] =3D { cmd_flush_cache, ALL_OK }, [WIN_FLUSH_CACHE_EXT] =3D { cmd_flush_cache, HD_CFA_OK }, [WIN_IDENTIFY] =3D { cmd_identify, ALL_OK }, [WIN_SETFEATURES] =3D { cmd_set_features, ALL_OK | SET_DSC= }, - [IBM_SENSE_CONDITION] =3D { cmd_ibm_sense_condition, CFA_OK | = SET_DSC }, - [CFA_WEAR_LEVEL] =3D { cmd_cfa_erase_sectors, HD_CFA_OK |= SET_DSC }, - [WIN_READ_NATIVE_MAX] =3D { cmd_read_native_max, HD_CFA_OK | S= ET_DSC }, + [IBM_SENSE_CONDITION] =3D { cmd_ibm_sense_condition, CFA_OK | + SET_DSC }, + [CFA_WEAR_LEVEL] =3D { cmd_cfa_erase_sectors, HD_CFA_OK | + SET_DSC }, + [WIN_READ_NATIVE_MAX] =3D { cmd_read_native_max, HD_CFA_OK | + SET_DSC }, }; =20 static bool ide_cmd_permitted(IDEState *s, uint32_t cmd) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index b402a93636..2b154d0344 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -75,7 +75,8 @@ static void bmdma_write(void *opaque, hwaddr addr, bmdma_cmd_writeb(bm, val); break; case 2: - bm->status =3D (val & 0x60) | (bm->status & 1) | (bm->status & ~va= l & 0x06); + bm->status =3D (val & 0x60) | (bm->status & 1) | + (bm->status & ~val & 0x06); break; } } diff --git a/hw/ide/via.c b/hw/ide/via.c index be09912b33..694d5e55a2 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -74,7 +74,8 @@ static void bmdma_write(void *opaque, hwaddr addr, bmdma_cmd_writeb(bm, val); break; case 2: - bm->status =3D (val & 0x60) | (bm->status & 1) | (bm->status & ~va= l & 0x06); + bm->status =3D (val & 0x60) | (bm->status & 1) | + (bm->status & ~val & 0x06); break; default:; } --=20 2.23.0