From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian Swetland Subject: Re: `git-send-email' doesn't specify `Content-Type' Date: Sat, 10 Nov 2007 04:35:05 -0800 Organization: Google, Inc. Message-ID: <20071110123505.GA24445@bulgaria> References: <87ode3klc7.fsf@chbouib.org> <20071110101420.GA21353@bulgaria> <20071110122528.GA4977@atjola.homenet> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fUYQa+Pmc3FrFX/N" Content-Transfer-Encoding: 8bit Cc: Johannes Schindelin , Ludovic =?iso-8859-1?Q?Court=E8s?= , git@vger.kernel.org To: =?iso-8859-1?Q?Bj=F6rn?= Steinbrink X-From: git-owner@vger.kernel.org Sat Nov 10 13:35:47 2007 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1IqpYw-0001EC-31 for gcvg-git-2@gmane.org; Sat, 10 Nov 2007 13:35:46 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751785AbXKJMf3 (ORCPT ); Sat, 10 Nov 2007 07:35:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751806AbXKJMf3 (ORCPT ); Sat, 10 Nov 2007 07:35:29 -0500 Received: from smtp-out.google.com ([216.239.33.17]:19612 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751713AbXKJMf2 (ORCPT ); Sat, 10 Nov 2007 07:35:28 -0500 Received: from zps77.corp.google.com (zps77.corp.google.com [172.25.146.77]) by smtp-out.google.com with ESMTP id lAACZLrw005356; Sat, 10 Nov 2007 12:35:22 GMT DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:date:from:to:cc:subject:message-id:references: mime-version:content-type:content-disposition: content-transfer-encoding:in-reply-to:organization:user-agent; b=C9uz31b+VExMXyNoOGXUqQvtRPp8MAgRXxFd0RGISBilUnYgDSC4DZddangyLeUYJ ThtZ87KKsvZrskqxWJBHQ== Received: from bulgaria (bulgaria.corp.google.com [172.18.102.38]) by zps77.corp.google.com with ESMTP id lAACZKup022571; Sat, 10 Nov 2007 04:35:21 -0800 Received: by bulgaria (Postfix, from userid 1000) id 3A26D8F45E; Sat, 10 Nov 2007 04:35:05 -0800 (PST) Content-Disposition: inline In-Reply-To: <20071110122528.GA4977@atjola.homenet> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit [Björn Steinbrink ] > On 2007.11.10 02:14:20 -0800, Brian Swetland wrote: > > > > The example I have involves a coworker's name which needs non-ascii > > characters. They are properly escaped in the From: line generated by > > git-format-patch. git-send-email puts the generated From: line at the > > top of the body of the email, unescapes it (to utf-8), and proceeds to > > send the email with no Content-Type specified. > > You mean that it converts the header field to utf-8? It doesn't do that > here (neither master nor 1.5.3.5) and IIRC that would be invalid anyway, > because Content-Type applies to exactly that, content, not headers. Your > sample has no non-ASCII characters (or at least I didn't see any), so > git-send-email doesn't add a header to specify a charset. The first line of the patch is a From: field with Arve's name, in an (rfc822?) encoded format): From: =?utf-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= The mail generated by git-send-email makes this From: line the first line of the *body* of the generated email. This line in the body is no longer escaped, the utf8 characters are visible, but the header of the message does not have a Content-Type indicating a non-ascii encoding. Attached are the result of git-format-patch and the actual email received from git-send-email (mbox format). Brian --fUYQa+Pmc3FrFX/N Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-hrtimer-Add-timer-back-to-pending-list-if-it-was-re.patch" >>From 3440baaed3b21138f6fc8b80e03769e3903f9c11 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Date: Wed, 7 Nov 2007 22:51:44 -0800 Subject: [PATCH] hrtimer: Add timer back to pending list if it was reactivated and has already expired again. This avoids problems with timer hardware that does not respond to timers set in the past. Signed-off-by: Brian Swetland --- kernel/hrtimer.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 22a2514..7c60769 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1149,8 +1149,14 @@ static void run_hrtimer_softirq(struct softirq_action *h) * If the timer was rearmed on another CPU, reprogram * the event device. */ - if (timer->base->first == &timer->node) - hrtimer_reprogram(timer, timer->base); + if (timer->base->first == &timer->node) { + if(hrtimer_reprogram(timer, timer->base)) { + __remove_hrtimer(timer, timer->base, + HRTIMER_STATE_PENDING, 0); + list_add_tail(&timer->cb_entry, + &cpu_base->cb_pending); + } + } } } spin_unlock_irq(&cpu_base->lock); -- 1.5.3.5 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename=mbox Content-Transfer-Encoding: 8bit >>From swetland@google.com Sat Nov 10 02:04:08 2007 Return-Path: X-Original-To: swetland@frotz.net Delivered-To: swetland@frotz.net Received: from smtp-out.google.com (smtp-out.google.com [216.239.45.13]) by mumble.frotz.net (Postfix) with ESMTP id 1BC002500D for ; Sat, 10 Nov 2007 02:04:08 -0800 (PST) Received: from zps35.corp.google.com (zps35.corp.google.com [172.25.146.35]) by smtp-out.google.com with ESMTP id lAAA5hUj030761; Sat, 10 Nov 2007 02:05:43 -0800 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:from:to:cc:subject:date:message-id:x-mailer; b=g2B628wRsJJahlIpNw3mgNDqOQKNMcUCPOurvqj+3fO6qLH+vpBS0ZwN1lLv6BnC7 w4QLOotDo7t+nI2KgZDVQ== Received: from bulgaria (bulgaria.corp.google.com [172.18.102.38]) by zps35.corp.google.com with ESMTP id lAAA5e22002202; Sat, 10 Nov 2007 02:05:42 -0800 Received: by bulgaria (Postfix, from userid 1000) id 613018F45E; Sat, 10 Nov 2007 02:05:25 -0800 (PST) From: swetland@google.com To: swetland@frotz.net Cc: =?utf-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Subject: [PATCH] hrtimer: Add timer back to pending list if it was reactivated and has already expired again. Date: Sat, 10 Nov 2007 02:05:25 -0800 Message-Id: <1194689125-21319-1-git-send-email-swetland@google.com> X-Mailer: git-send-email 1.5.3.5 X-SpamProbe: GOOD 0.0000099 b892c7c5c469d044f28ab48846487cf5 X-SpamCheck: OKAY Status: RO Content-Length: 983 Lines: 33 From: Arve Hjønnevåg This avoids problems with timer hardware that does not respond to timers set in the past. Signed-off-by: Brian Swetland --- kernel/hrtimer.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 22a2514..7c60769 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1149,8 +1149,14 @@ static void run_hrtimer_softirq(struct softirq_action *h) * If the timer was rearmed on another CPU, reprogram * the event device. */ - if (timer->base->first == &timer->node) - hrtimer_reprogram(timer, timer->base); + if (timer->base->first == &timer->node) { + if(hrtimer_reprogram(timer, timer->base)) { + __remove_hrtimer(timer, timer->base, + HRTIMER_STATE_PENDING, 0); + list_add_tail(&timer->cb_entry, + &cpu_base->cb_pending); + } + } } } spin_unlock_irq(&cpu_base->lock); -- 1.5.3.5 --fUYQa+Pmc3FrFX/N--