lkml.org 
[lkml]   [2006]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] block: kill not-so-popular simple flag testing macros
    Tejun Heo wrote:
    > This patch kills the following request flag testing macros.
    >
    > blk_noretry_request()
    > blk_rq_started()
    > blk_pm_suspend_request()
    > blk_pm_resume_request()
    > blk_sorted_rq()
    > blk_barrier_rq()
    > blk_fua_rq()
    >
    > All above macros test for single request flag and not used widely and
    > seem to contribute more to obscurity than readability.
    >
    > Signed-off-by: Tejun Heo <htejun@gmail.com>

    heh, I guess that's a manner of opinion :)

    To me, your patch makes things less readable. Example:

    > - int is_barrier = blk_fs_request(rq) && blk_barrier_rq(rq);
    > + int is_barrier = blk_fs_request(rq) && rq->flags & REQ_HARDBARRIER;

    After your change is applied, the above statement is no longer visually
    consistent with itself. The reader must decode two different styles of
    test in his brain, as opposed to one.

    Jeff


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-02-09 19:45    [W:5.416 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site