From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
Michael Schmitz <schmitzmic@gmail.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 10/28] ata: separate PATA timings code from libata-core.c
Date: Fri, 7 Feb 2020 15:20:52 +0100 [thread overview]
Message-ID: <47876d63-4cf2-49dc-6d7a-8a3d82ee6ee7@samsung.com> (raw)
In-Reply-To: <20200129172323.GF12616@infradead.org>
On 1/29/20 6:23 PM, Christoph Hellwig wrote:
>> +// SPDX-License-Identifier: GPL-2.0-or-later
>> +/*
>> + * libata-pata-timings.c - helper library for PATA timings
>
> Please remove the file name from the top of the file header.
>
>> +static void ata_timing_quantize(const struct ata_timing *t, struct ata_timing *q, int T, int UT)
>> +{
>
>> +void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b,
>> + struct ata_timing *m, unsigned int what)
>> +{
>
> Please fix the overly long lines while you're at it.
>
>> + if (what & ATA_TIMING_SETUP ) m->setup = max(a->setup, b->setup);
>> + if (what & ATA_TIMING_ACT8B ) m->act8b = max(a->act8b, b->act8b);
>> + if (what & ATA_TIMING_REC8B ) m->rec8b = max(a->rec8b, b->rec8b);
>> + if (what & ATA_TIMING_CYC8B ) m->cyc8b = max(a->cyc8b, b->cyc8b);
>> + if (what & ATA_TIMING_ACTIVE ) m->active = max(a->active, b->active);
>> + if (what & ATA_TIMING_RECOVER) m->recover = max(a->recover, b->recover);
>> + if (what & ATA_TIMING_DMACK_HOLD) m->dmack_hold = max(a->dmack_hold, b->dmack_hold);
>> + if (what & ATA_TIMING_CYCLE ) m->cycle = max(a->cycle, b->cycle);
>> + if (what & ATA_TIMING_UDMA ) m->udma = max(a->udma, b->udma);
>
> and this very strange coding style.
>
>> + if (!(s = ata_timing_find_mode(speed)))
>> + return -EINVAL;
>
> This should be:
>
> s = ata_timing_find_mode(speed);
> if (!s)
> return -EINVAL;
>
>> + /* In a few cases quantisation may produce enough errors to
>> + leave t->cycle too low for the sum of active and recovery
>> + if so we must correct this */
>
> .. non-standard comment style here.
I've added additional patch in v2 version of the patchset fixing
above CodingStyle issues in PATA timings code in libata-core.c
(just before the code gets separated to libata-pata-timings.c).
>> +#ifdef CONFIG_ATA_ACPI
>> extern u8 ata_timing_cycle2mode(unsigned int xfer_shift, int cycle);
>> +#endif
>
> I don't think we need this ifdef - unused prototypes are completely
> harmless.
Fixed in v2 version of the patch.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
next prev parent reply other threads:[~2020-02-07 14:20 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200128133410eucas1p19fb97c9696596da07181e0c630fb6c6b@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 00/28] ata: optimize core code size on PATA only setups Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133410eucas1p271284329b9b63c2c48167308809c569c@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 01/28] ata: remove stale maintainership information from core code Bartlomiej Zolnierkiewicz
2020-01-28 14:28 ` Tejun Heo
[not found] ` <CGME20200128133411eucas1p2db496c50fea321b621b1a07b4b8a8cc2@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 02/28] ata: expose ncq_enable_prio sysfs attribute only on NCQ capable hosts Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133411eucas1p1671c280eb6f5d2ca2d10743eea6c96e5@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 03/28] ata: make SATA_PMP option selectable only if any SATA host driver is enabled Bartlomiej Zolnierkiewicz
2020-01-29 2:35 ` Martin K. Petersen
[not found] ` <CGME20200128133412eucas1p2c79626824fcadc63c133548cd2e7d8cf@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 04/28] sata_promise: use ata_cable_sata() Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133412eucas1p258499338146481964e4c26ad3f1cbf14@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 05/28] ata: simplify ata_scsiop_inq_89() Bartlomiej Zolnierkiewicz
2020-01-29 17:15 ` Christoph Hellwig
[not found] ` <CGME20200128133412eucas1p2e5e3e29ea554bf57c1f2cc05b3d2d3a8@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 06/28] ata: use COMMAND_LINE_SIZE for ata_force_param_buf[] size Bartlomiej Zolnierkiewicz
2020-01-29 17:18 ` Christoph Hellwig
2020-02-07 14:17 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133412eucas1p1b1b4f025e4c0e6ae6e7a95e9832880dd@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 07/28] ata: optimize struct ata_force_param size Bartlomiej Zolnierkiewicz
2020-01-29 17:18 ` Christoph Hellwig
[not found] ` <CGME20200128133413eucas1p195d291f69413cbb3bb86da9571942259@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 08/28] ata: move EXPORT_SYMBOL_GPL()s close to exported code Bartlomiej Zolnierkiewicz
2020-01-29 17:18 ` Christoph Hellwig
[not found] ` <CGME20200128133413eucas1p1725ccae03fb5aba49f0e0cef798da9d6@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 09/28] ata: remove EXPORT_SYMBOL_GPL()s not used by modules Bartlomiej Zolnierkiewicz
2020-01-29 17:19 ` Christoph Hellwig
[not found] ` <CGME20200128133414eucas1p14b041a2d58ca70817f3007c0f405ee73@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 10/28] ata: separate PATA timings code from libata-core.c Bartlomiej Zolnierkiewicz
2020-01-29 17:23 ` Christoph Hellwig
2020-02-07 14:20 ` Bartlomiej Zolnierkiewicz [this message]
[not found] ` <CGME20200128133414eucas1p1c69ee66d4799a5aea22561b42ab73e11@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 11/28] ata: add CONFIG_SATA_HOST=n version of ata_ncq_enabled() Bartlomiej Zolnierkiewicz
2020-01-29 17:24 ` Christoph Hellwig
2020-02-07 14:21 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133414eucas1p2baefeb1a492375b18bdf6cdfbd0db796@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 12/28] ata: start separating SATA specific code from libata-core.c Bartlomiej Zolnierkiewicz
2020-01-29 17:26 ` Christoph Hellwig
2020-02-07 14:22 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133415eucas1p258c0d5c313e2ae42a05508b67eec16ef@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 13/28] ata: move ata_do_link_spd_horkage() to libata-core-sata.c Bartlomiej Zolnierkiewicz
2020-01-29 17:28 ` Christoph Hellwig
2020-02-07 14:23 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133415eucas1p1cd35ec3ee9783b76c1a32de63796ce30@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 14/28] ata: move ata_dev_config_ncq*() " Bartlomiej Zolnierkiewicz
2020-01-29 17:29 ` Christoph Hellwig
2020-02-07 14:23 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133415eucas1p12cc620dd5f19e6a26f1deeba083ea82f@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 15/28] ata: move sata_print_link_status() " Bartlomiej Zolnierkiewicz
2020-01-29 17:30 ` Christoph Hellwig
2020-02-07 14:24 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133416eucas1p1eb121384be2323aed1fc63a6d1ebe14f@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 16/28] ata: move sata_down_spd_limit() " Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133416eucas1p240f8fc15b334e0608cce30f2b6f0fbe1@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 17/28] ata: move *sata_set_spd*() " Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133416eucas1p172512260c12e8cce9516dd194c467134@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 18/28] ata: move sata_link_{debounce,resume}() " Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133417eucas1p1b907d220ad2b809cdf628fb47a14589c@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 19/28] ata: move sata_link_hardreset() " Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133417eucas1p28b1e3fbb20c686bd75997f5339993071@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 20/28] ata: move sata_link_init_spd() " Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133417eucas1p27f91558f4b86f6951d2f9f1ed19d84b5@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 21/28] ata: move ata_qc_complete_multiple() " Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133418eucas1p1b28eb901c4d21446376c1028b2977017@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 22/28] ata: move sata_scr_*() " Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133418eucas1p1fd63b12146a2848ab61db768fde77857@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 23/28] ata: move sata_deb_timing_*() " Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133418eucas1p157933935f14f9c83c604bc5dc38bcbae@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 24/28] ata: start separating SATA specific code from libata-scsi.c Bartlomiej Zolnierkiewicz
2020-01-29 11:13 ` Bartlomiej Zolnierkiewicz
2020-01-29 17:31 ` Christoph Hellwig
2020-01-29 17:46 ` Martin K. Petersen
2020-02-07 14:25 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133419eucas1p14f7ed619db42aba72e83b7814f45a3bc@eucas1p1.samsung.com>
2020-01-28 13:33 ` [PATCH 25/28] ata: move ata_sas_*() to libata-scsi-sata.c Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133419eucas1p293e7f2e62e74c9208a30fd83650e8615@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 26/28] ata: start separating SATA specific code from libata-eh.c Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133420eucas1p294e2d41ec0eb0457ff781c69a5bcc489@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 27/28] ata: move ata_eh_analyze_ncq_error() & co. to libata-core-sata.c Bartlomiej Zolnierkiewicz
[not found] ` <CGME20200128133420eucas1p23e99a72e7735412f93dc015b8cb25d4b@eucas1p2.samsung.com>
2020-01-28 13:33 ` [PATCH 28/28] ata: move ata_eh_set_lpm() " Bartlomiej Zolnierkiewicz
2020-01-28 14:00 ` [PATCH 00/28] ata: optimize core code size on PATA only setups Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47876d63-4cf2-49dc-6d7a-8a3d82ee6ee7@samsung.com \
--to=b.zolnierkie@samsung.com \
--cc=axboe@kernel.dk \
--cc=geert@linux-m68k.org \
--cc=hch@infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=schmitzmic@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).