diff for duplicates of <1490654409.7897.15.camel@sandisk.com> diff --git a/a/1.txt b/N1/1.txt index 06c1b35..c9cc88a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,19 +1,19 @@ On Mon, 2017-03-20 at 16:43 -0400, Christoph Hellwig wrote: > + case SD_LBP_ATA_TRIM: -> + max_blocks =3D 65535 * (512 / sizeof(__le64)); +> + max_blocks = 65535 * (512 / sizeof(__le64)); > + if (sdkp->device->ata_trim_zeroes_data) -> + q->limits.discard_zeroes_data =3D 1; +> + q->limits.discard_zeroes_data = 1; > + break; Do we need a comment here that explains where the numbers 65535 and 512 come from? -> + u64 sector =3D blk_rq_pos(rq) >> (ilog2(sdp->sector_size) - 9); -> + u32 nr_sectors =3D blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9); +> + u64 sector = blk_rq_pos(rq) >> (ilog2(sdp->sector_size) - 9); +> + u32 nr_sectors = blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9); Please consider using logical_to_sectors() instead of open-coding this function. Thanks, -Bart.= +Bart. diff --git a/a/content_digest b/N1/content_digest index 8d7ab93..a85ce7c 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -14,22 +14,22 @@ "b\0" "On Mon, 2017-03-20 at 16:43 -0400, Christoph Hellwig wrote:\n" "> +\tcase SD_LBP_ATA_TRIM:\n" - "> +\t\tmax_blocks =3D 65535 * (512 / sizeof(__le64));\n" + "> +\t\tmax_blocks = 65535 * (512 / sizeof(__le64));\n" "> +\t\tif (sdkp->device->ata_trim_zeroes_data)\n" - "> +\t\t\tq->limits.discard_zeroes_data =3D 1;\n" + "> +\t\t\tq->limits.discard_zeroes_data = 1;\n" "> +\t\tbreak;\n" "\n" "Do we need a comment here that explains where the numbers 65535 and\n" "512 come from?\n" "\n" - "> +\tu64 sector =3D blk_rq_pos(rq) >> (ilog2(sdp->sector_size) - 9);\n" - "> +\tu32 nr_sectors =3D blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9);\n" + "> +\tu64 sector = blk_rq_pos(rq) >> (ilog2(sdp->sector_size) - 9);\n" + "> +\tu32 nr_sectors = blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9);\n" "\n" "Please consider using logical_to_sectors() instead of open-coding this\n" "function.\n" "\n" "Thanks,\n" "\n" - Bart.= + Bart. -73d4697a227fd80119c51b6ec65c875db57af1f4a0abb43b6ee53f00505ec811 +61589cc4c04f2ccc4d3a9d0f7579f7e534e99c638e7eafcead2362b39b929502
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.