Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932277AbbFEHzJ (ORCPT ); Fri, 5 Jun 2015 03:55:09 -0400 Received: from mail-qc0-f173.google.com ([209.85.216.173]:35791 "EHLO mail-qc0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbbFEHzG (ORCPT ); Fri, 5 Jun 2015 03:55:06 -0400 MIME-Version: 1.0 Date: Fri, 5 Jun 2015 00:55:05 -0700 Message-ID: Subject: Re: [PATCH] fbdev: radeon: Remove 'struct timeval' usage From: Tina Ruchandani To: Dave Airlie Cc: Tomi Valkeinen , Arnd Bergmann , y2038@lists.linaro.org, Benjamin Herrenschmidt , Jean-Christophe Plagniol-Villard , Linux Fbdev development list , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 712 Lines: 21 >>> + hz = 1000000/delta; > > This needs to be on of the do_div family. > > Dave. Hi Dave, I build-tested the patch for both 32-bit and 64-bit x86. If my understanding is correct, since the divisor is 64-bit here, the compiler will do "if (delta > 1000000) hz = 0; else hz = 1000000/(s32)delta" automatically? In general, is this a good thumb-rule to follow - use do_div if the dividend is 64-bit, and normal divide operator if only the divisor is 64-bit? Tina -- 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/